title: How to allow running only one instance of a Java program at a time?
body: <p>I need to prevent users from starting my Java application (WebStart Swing app) multiple times. So if the application is already running it shouldn't be possible to start it again or show a warning / be closed again.</p>
  
  <p>Is there some convenient way to achieve this? I thought about blocking a port or write sth to a file. But hopefully you can access some system properties or the JVM?</p>
  
  <p>btw. target platform is Windows XP with Java 1.5</p>