Running a Java app for a long time… after logging out.
Copied this init script:
https://gustavostraube.wordpress.com/2009/11/05/writing-an-init-script-for-a-java-application/
then:
chmod 755 run-script.sh
./run-script.sh start # Start
./run-script.sh stop # Stop
./run-script.sh restart # Restart
Some discussions:
https://stackoverflow.com/questions/534648/how-to-daemonize-a-java-program
https://stackoverflow.com/questions/958249/whats-the-difference-between-nohup-and-a-daemon