Is there way to trap the keystroke CTRL-C in an Java appplication?

Davanum Srinivas

JDK 1.3 has introduced a hooks for handling termination and exit. You can use Runtime.addShutdownHook to specify a thread to run when the JVM exits or is terminated by user-logoff/system-shutdown.

There is an article on JDC Tech Tips on this subject at

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact