Running Java jar file as Auto Restarting Service on Linux
Running “java -jar YOURjarfile.jar” will of course start a jar on your linux machine, but it will stop running once you disconnect your ssh session for instance. So you do need to run your jar file in the background. Pierre Janineh described a way to achieve this goal: %[https://medium.com/programming-with-pierre/start-a-java-service-from-jar-on-an-ubuntu-instance-40dff8acc4a5] Another approach is obviously to run your jar “as a service” via systemd. If you ensure that this service will auto restart in case of a failure or after reboot, you Java application will again restart magically and automatically. ...