// Attach shutdown handler to catch control-c
Runtime.getRuntime().addShutdownHook(new Thread("control c shutdown--hook") {
@Override
public void run() {
Runtime.getRuntime().addShutdownHook(new Thread("control c shutdown--hook") {
@Override
public void run() {
//Save and close if any object state require persistence.
}
});
}
});
No comments:
Post a Comment