24-08-2009, 04:15 PM
I need to run some code (unload stuff etc) when the program ends. It is a program not an applet. Anybody know the method to use?
JAVA Run code when program ends
|
24-08-2009, 04:15 PM
I need to run some code (unload stuff etc) when the program ends. It is a program not an applet. Anybody know the method to use?
24-08-2009, 06:19 PM
Ends how? If someone kills the VM you are fucked. How will the application be ending?
24-08-2009, 06:41 PM
Well I worked around this, but i was thinking like when I press stop in the ide. But yea, I just tweaked my code so i am not using all of the files etc at all times, and so i can unload them when I'm done using them, instead of when the program closes. Seems like a good thing to know though.
24-08-2009, 06:51 PM
http://java.sun.com/docs/books/tutorial ... tDemo.java
an example of how to setup and use WindowListener. I just started playign with it yesterday myself. |
« Next Oldest | Next Newest »
|