Any way to “reboot” the JVM?

Your best bet is probably to run the java interpreter within a loop, and just exit. For example:

#!/bin/sh
while true
do
    java MainClass
done

If you want the ability to reboot or shutdown entirely, you could test the exit status:

#!/bin/sh
STATUS=0
while [ $STATUS -eq 0 ]
do
    java MainClass
    STATUS=$?
done

Within the java program, you can use System.exit(0) to indicate that you want to “reboot,” and System.exit(1) to indicate that you want to stop and stay stopped.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)