commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo José Hernández Cisneros <ejhernan...@hotmail.com>
Subject [commons-launcher] How to add a shutdown hook?
Date Mon, 10 Apr 2006 22:21:39 GMT
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


Mime
View raw message