Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from stackoverflow.com Mar 19 '11 at 13:45

This question came from our site for professional and enthusiast programmers.

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

share|improve this answer

Common solution is to use JSW, I think

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.