i wrote a little java server which i'm running on my CentOS 5 VPS server. currently i just ssh onto the server and start the jar through commandline. How an i turn this jar into a system service and set it such that it starts automatically when the system starts and also that it restarts automatically if it crashes?


2 Answers 2


Common solution is to use JSW, I think


You could use jsvc from the Apache Commons project. You'll still need to write an init script utilizing jsvc, though.

You must log in to answer this question.