Using RTDE to get Safety_mode and Robot_mode in JAVA

Hey;
Im trying to use RTDE to get the safety mode and the robot mode of the ur controller and use them in my urcap written in java. Im quite new to programming in general and haven’t found any guides on RTDE for java. I’ve found a project which seems to have all the parts i need (linked) but i don’t know how to use it.
pls help, thanks!