Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » change behavior of terminate button
change behavior of terminate button [message #259032] Wed, 11 March 2009 09:07
Eclipse UserFriend
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?
Previous Topic:Need a selection dialog box for selecting classes, methods, fields
Next Topic:ASTRewrite and PackageDeclaration
Goto Forum:
  


Current Time: Wed May 07 15:37:38 EDT 2025

Powered by FUDForum. Page generated in 0.04547 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top