File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 146

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: 3707

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