I have a server - client pair written in java and I would like to quit one application if the other one is quit. How is this done?
I would also like to know how to make the program do a sequence of commands (e.g. close sockets etc.) if the user quits the application manually (i.e. by pressing cmd+q.alt+F4 etc.)