0

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 ?

1 Answers1

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'

Mitch
  • 4,807