please let me know how can i track an abnormal termination of a java program. i.e. on press of ^C i should be able to catch the termination and display a message. thanks for any help.
Originally posted by Karel Young: Does the System throw an Exception when you do that or not? I think that there is also an onTermination routine that you may be able to call as well
The system dosent throw an exception on exit.
i am trying out 1. Runtime.addShutdownHook 2. System.runFinalizersOnExit () but it is not helping much.