A way to "Reboot" the JVM

quarks picture quarks · Jan 17, 2013 · Viewed 25.6k times · Source

Possible Duplicate:
Any way to “reboot” the JVM?

I added tools.jar in our JRE /lib/ext folder and I need to do a JVM reboot under windows. Is that possible without restarting the server?

Answer

Stephen C picture Stephen C · Jan 17, 2013

I added tools.jar in our JRE /lib/ext folder ...

That is a bad idea. If you need to use stuff in 'tools.jar' you should be installing a JDK, not hacking a JRE installation.

... and I need to do a JVM reboot under windows. Is that possible wihtout restarting the server?

Ermm ...

If you are asking if it is possible to restart the application / server JVM without restarting the entire operating system, of course it is!

If you are asking if you need to restart the JVM to get it to see new stuff in '/lib/ext', then the answer is yes. The JVM reads that directory on startup and won't notice files that are written there while it is running.

If you are asking how a JVM can reboot itself, see the linked question.

If you are asking how to restart the JVM / service from the outside, the answer is (probably) via the Windows service control GUI ... depending on which version of Windows you are using. (And that's not a programming question ...)