It's not a secret anymore!
The moose likes Threads and Synchronization and the fly likes Regarding removeShutdownHook and addShutdownHook Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Regarding removeShutdownHook and addShutdownHook" Watch "Regarding removeShutdownHook and addShutdownHook" New topic

Regarding removeShutdownHook and addShutdownHook

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 151

Could you please tell me what the use of Runtime.getRuntime().removeShutdownHook() and Runtime.getRuntime().addShutdownHook().

Santhosh Kumar VK
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

The javadoc entry for addShutdownHook is actually quite detailed: java.lang.Runtime#addShutdownHook(java.lang.Thread).

I'd suggest to read that first and then ask specific questions, if needed.
I agree. Here's the link:
subject: Regarding removeShutdownHook and addShutdownHook
It's not a secret anymore!