Take the 2-minute tour ×
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.

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
add comment

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

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

2 Answers

Common solution is to use JSW, I think

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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