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
Try JUnique:
String appId = "com.example.win.run.main"; boolean alreadyRunning; try { JUnique.acquireLock(appId); alreadyRunning = false; } catch (AlreadyLockedException e) { alreadyRunning = true; } if (alreadyRunning) { Sysout("An Instance of this app is already running"); System.exit(1); }