..JavaBendeR...
Copy, paste, run, bye ...
Wednesday, July 14, 2010
How to detect JVM Shutdown
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
boolean jvmShuttingDown = false;
private class ShutdownHook extends Thread {
public void run() {
jvmShuttingDown = true;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment