Skip to Main Content

Java Programming

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Ensure single instance of Java application

807580Aug 4 2010 — edited Nov 4 2010
Hi,

I'd like to make sure that only one instance of my Java application can be run and I've done some search around. The recommended approach seems to be using ServerSocket that occupies a certain port.

On the other hand I've seen that JConsole could display the names of all Java processes that are running. This is perhaps another approach to the issue? JConsole is said to be a pure Java tool, so I was wondering how this is implemented. I've googled a bit but still could not find out how. Could someone please give me a hint?

Thanks a lot!

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 2 2010
Added on Aug 4 2010
22 comments
12,605 views