How do java people handle clean up of their apps when the program receives a kill signal?
For instance, there is an application i connect to which wants any third party app ( my app) to send a "finish" command. What is the best say to send that "finish" command if one does a kill -9 on me.
What is the best way to capture a kill signal in java without using JNI. I did discover the sun.misc.Signal and the sun.misc.SignalHandler and the warning of the possibility of being removed in the future releases.
Would using JNI to call a c lib be the only option i have?
How do you handle clean up when the program receives a kill signal?
For instance, there is an application I connect to that wants any third party app (my app) to send a finish command. What is the best say to send that finish command when my app has been destroyed with a kill -9?
How do you handle clean up when the program receives a kill signal?
For instance, there is an application I connect to that wants any third party app (my app) to send a finish command. What is the best say to send that finish command when my app has been destroyed with a kill -9?