Mirage Source
http://miragesource.net/forums/

JAVA Run code when program ends
http://miragesource.net/forums/viewtopic.php?f=142&t=6166
Page 1 of 1

Author:  Labmonkey [ Mon Aug 24, 2009 4:15 pm ]
Post subject:  JAVA Run code when program ends

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?

Author:  Coke [ Mon Aug 24, 2009 6:19 pm ]
Post subject:  Re: JAVA Run code when program ends

Ends how? If someone kills the VM you are fucked. How will the application be ending?

Author:  Labmonkey [ Mon Aug 24, 2009 6:41 pm ]
Post subject:  Re: JAVA Run code when program ends

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.

Author:  grimsk8ter11 [ Mon Aug 24, 2009 6:51 pm ]
Post subject:  Re: JAVA Run code when program ends

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/