Server Fault is a question and answer site for system and network administrators. 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 am trying to launch a java process as a server and then might periodically need to restart/kill it at certain times. Since I use a shell script to launch java jvm(to build classpath), I thought of logging the shell script process id using $$ and then run java as "exec java" so that I can use the logged process id for killing the process and launching the new jvm. Is that the best way to do it? Any feedback?

share|improve this question

In my opinion one of the best ways to launch, control and maintain java processes/daemons is by putting them under control of the tanuki service wrapper, see here for more information:

share|improve this answer
service wrappers sound interesting. I will take a look at Tanuki and other options. – aditya Oct 18 '11 at 8:38

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.