ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12796] New: - Java Shutdownhook not getting called
Date Thu, 19 Sep 2002 02:40:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12796>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12796

Java Shutdownhook not getting called

           Summary: Java Shutdownhook not getting called
           Product: Ant
           Version: 1.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Build Process
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: matteyamar@msn.com


I launch a Swing Application using ant. Some times the user terminates the 
process by sayin ^C. When the swing application is exited I need to close 
database connections and also do some clean up. I registered for 

Runtime.getRuntime().addShutdownHook(new Thread() {
                public void run() {
                  System.out.println("^C is pressed");
                }
            });

This particular statement is never executed when I start my application throw 
ant. I tested by launching using regular command line anf this message is 
printed and all my clean up code worked fine. 

This is blocking me from using ant right know.
Any help is appreciated.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message