Ubuntu: How to make a .jar file execute on ubuntu server 14 startup



Question:

How do i make my .jar file execute on startup because we have constant blackouts here and when the server starts up i want the server.jar to start as well.

Is there any simple way of doing this ?


Solution:1

Edit the /etc/rc.local file by doing:

sudo nano /etc/rc.local  

And in there type

java -jar /path/to/your/file.jar  

Make sure this goes BEFORE the 'exit 0'


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »