• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to sense that use wants to terminate the Host  RSS feed

 
bhaswar goswami
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ,
i have a some application that is run from commad prompt .
Then it wil run until user wants to stop the Host .
So, the problem it how can u catch the event from java that the user pressed [ctrl+c] and shut down the host.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd try to make a more gracious way to shut down. Maybe:

Does that make sense?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!