Oct
01
|
Use shutdown hook thread.
Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { // this will get called on shutdown shutdownCleanup(); } });
Leave a Reply
You must be logged in to post a comment.