I have written a javafx media player.I want to run this on start-up. The mediaplayer.jar file is located at Desktop.The player plays the files inside a data folder which is in the same directory.
Asked
Active
Viewed 5,554 times
-1
-
possible duplicate of [How to run a script at the start up of Ubuntu?](http://stackoverflow.com/questions/8339555/how-to-run-a-script-at-the-start-up-of-ubuntu) – Raedwald Jun 26 '14 at 12:26
-
possible duplicate of http://stackoverflow.com/questions/13758317/how-to-start-the-java-jar-application-at-boot-time-of-ubuntu – Raedwald Jun 26 '14 at 12:28
1 Answers
4
Thanks Raedwald. I studied the post you mentioned and I finally resolved it.
Here the steps I did.
startapp.sh
#!/bin/bash
java -jar /home/usr/local/bin/vedioplayer.jar
created the above script and saved it in /etc/init.d make sure you allow execution of the shell script.
sudo chmod +x /etc/init.d/startapp.sh
After that run the follwing command
sudo update-rc.d startapp.sh defaults 98 02
Also you can add the script to Startup Applications list from Applications.

Rajith Pemabandu
- 616
- 7
- 14