Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restricting Multiple Opening of Java Application

843804Apr 21 2004 — edited Oct 28 2004
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2004
Added on Apr 21 2004
12 comments
403 views