You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Eduardo José Hernández Cisneros <ej...@hotmail.com> on 2006/04/11 00:21:39 UTC

[commons-launcher] How to add a shutdown hook?

Hello,

I am using commons-launcher in my application, but I need to add a shutdown 
hook to release my resources. I add a shutdow hook like this:

Runtime.getRuntime().addShutdownHook(new Thread() {
    public void run() {
        shutdown();
    }
});

but in a ctrl-c, it does not seem to be called. Does anybody knows how to 
add a shutdown hook if I am using commons-launcher in my application?

Thank you for your time.


--Eduardo



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-launcher] How to add a shutdown hook?

Posted by Messi Chan <ch...@gmail.com>.
Hi

I met the same problem. Anyone give me some solution?

thx a lot :D


-- 
View this message in context: http://www.nabble.com/-commons-launcher--How-to-add-a-shutdown-hook--tf1428146.html#a11414126
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org