I would like to stop a running Java-program in a controlled way.
I have started the program with a bash-script called with crontab and it runs on a Ubuntu server.
I want the Java-program to exit in a controlled way so not kill it.
I can't have an input-console and make it listen to a socket and send a packet to that socket to make it stop seems to much work and hard to do locally on the server.
Is there some other approach I can take on this problem?