Restricting Multiple Opening of Java Application
843804Apr 21 2004 — edited Oct 28 2004I have a swing application communicating with Servlets. I wish to restrict the running of application only once at a time. I thought of serializing the state of application, i.e., positive means application is running and negative means application is closed, in an object so that the application may read the serialized object to determine if the application is already running. The problem I found with this technique is that if the computer is shut down improperly while the application is running, the state of application will remain positive after the start the computer and the application will never run.
Please advise the easy way around to restrict multiple opening of an java application.
Thanks.