Universal Robots Forum

Starting Java JAR file on Polyscope/UR Boot

Is there a way to use the Linux machine to run a Java JAR file on boot?

I already attempted to create a Linux .sh file with “java -jar myapp.jar” in the /etc/init.d folder and used “update-rc.d myscript defaults” to use SysV so that the script would start the system but it did not seem to work. In addition to this, I attempted to insert the “java -jar myapp.jar” command inside of the urcontrol.sh after the urcontrol call but that also did not work.

Also, will this functionality cause issues with any dependencies that URControl relies on?

Thank you much for your help.


Hi Mike,

I would suggest creating a URCap. This is essentially a jar-archive.
A URCap is an OSGi bundle, and the start() method in the Activator-class is called on PolyScope boot.

My intention is to eventually develop this into a URCap but currently I would like a quicker solution to get the application off the ground. Is there a quick/simpler alternative? I’d like to bypass the HTML, Maven, URCap deployment, etc. dev and debug for right now.

And thank you by the way for the quick response.

Best Regards,

Michael Berger
Software Engineer - Robotics

FlexLink Systems, Inc.
6580 Snowdrift Road
Allentown, PA 18106 / USA
M +1 484 862 5629

For quick workaround you can ssh into the robot and start your JAR from command line.