I'm trying to test a shutdown handler, registered in an app with
The idea is that, when the JVM starts to shut down, this thread (shutdownThread) will be started. For a command-line app, this includes the JVM shutting down in response to a CTRL-C interrupt, as well as a terminal Exception.
The question is: how do I emulate this when I am running the app within IDEA? Hitting CTRL-C has no effect. Can't find anything about this in the help files.
Any answers, anyone?