I have a remote control app for my phone that controls the TV in my living that is hooked up to an old laptop (a little getto, but it works great). The app requires that I have a .jar file running on my computer. To make everything run smooth, I wanted to have the .jar file run at start-up so when I turn on the computer everything is ready to go. I had a hard time finding out how to do this online so I wanted go over quickly how I ended up doing it. It’s actually really easy.
First make sure you have a Java runtime installed. If you don’t have one yet, open your terminal by pressing ctl+alt+T and copy and paste the following line.
sudo apt-get install openjdk-7-jre
Right click on the jar file you would like to run at start-up, then find properties at the bottom of the list. Once your in the dialog, click on the tab that says permissions.
Check the box that says “Allow executing as a program.” This does exactly what it sounds like it would do, it will simply allow you to run the program.
Next open unity and type “Startup Applications” and click on the application.
Click on add.
You can name your launcher whatever you like then click on the browse button and fin your .jar file. Your not done yet, you will also need to add
java -jar in front of the files location in the command window. The command field should have something like the following in it.
java -jar /home/myName/Desktop/MyJarName.jar
Click add, then close the Startup Application dialog window and your done. Next time you start-up your computer, your jar file should run.