Hi,
Any one can advise me how ot stop and restart JVM by command line or
script in the Windows 2000 and Windows XP environment?
Thanks,
Goha
Thomas Kellerer - 06 Nov 2007 22:09 GMT
Goha wrote on 06.11.2007 22:44:
> Hi,
>
> Any one can advise me how ot stop and restart JVM by command line or
> script in the Windows 2000 and Windows XP environment?
The JVM is started with the command "java".
It is stopped by stopping the application started within the JVM
This is a simplified version of the specification:
http://java.sun.com/docs/books/jls/second_edition/html/execution.doc.html#44411
Roedy Green - 06 Nov 2007 23:34 GMT
>Any one can advise me how ot stop and restart JVM by command line or
>script in the Windows 2000 and Windows XP environment?
starting and restarting is easy. Just use java.exe. See
http://mindprod.com/jgloss/javaexe.html
Stopping requires the app to notice and shut down. One simple way is
to copy in a "pleasestop.dat" file into a directory. The app
periodically checks for its existence. If it finds it, it deletes it
and shuts down gracefully.
You can also do it my sending a packet or message on a socket.
You also might do it with some platform specific trigger you catch in
C++ then pass on to Java via JNI.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com