change behavior of terminate button [message #259032] |
Wed, 11 March 2009 13:07 |
Tobias![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=hzdnmhvyfq1smrh%40jetable.net) Messages: 1 Registered: July 2009 |
Junior Member |
|
|
I created a small program. Inside that program is a class
which I registered as a shutdownhookthread to jvm. I just
invoked Runtime.addShutDownHook( myShutDownHookThread ). The
inside the run method of myShutDownHookThread is a line which
calls stop() method and the stop method is just simply
System.out.println("shutdownhook thread called");
I tried to run the program using the command line. When I
pressed Ctrl+C, "shutdownhook thread called" was printed.
However, I tried to run in as a java application in eclipse.
When I pressed the red button, nothing is printed. I had a
doubt if the shutdown sequence of jvm was executed.
so, is there any chance of getting the jvm shutdown correctly
by clicking the red button in the console view? any suggestions?
|
|
|
Powered by
FUDForum. Page generated in 0.02751 seconds