-1

There are some really horrible scenarios that could happen to java virtual machine. Something more dreadful than uncaught exception, like an error. So I'd like to restart application automatically in this case in recover mode and clean resources that it have dropped half-way.

What is robust method to restart java machine on failure? Google suggests some general purpose baby-sitters like daemon tools, but I search for more platform independent and java-oriented solution. Like a native extension for example.

ayvango
  • 5,867
  • 3
  • 34
  • 73

1 Answers1

0

What I do is have a shell script which checks the exit code. If the exit code is an error it restarts the problem in a loop. Otherwise the shell script exits.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130