Sometime I see many application such as msn, windows media player etc that are single instance applications (when user executes while application is running a new application instance will not created).
In C#, I use Mutex class for this but I don’t know how to do this in Java.
If I believe this article, by :
Note: Ahe mentions in the comment that using
InetAddress.getLocalHost()can be tricky:getLocalHost: return IP address of machine, vs. Actual results : return127.0.0.1.Or you may use
ManagementFactoryobject. As explained here:JNLP offers also a
SingleInstanceListener