Java on kill method -


i have java program writes 1 file multiple files, not connections open @ same time.

i want add method remove of these created files when program killed (by using ctrl-c in command line).

adding shutdown hook executed when object shut down, want remove them if program killed. there runtimeexception can catch?

take @ runtime.getruntime().addshutdownhook(). here's example.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -