I want to prevent multiple instances of application being launched in java. I know 2 methods for this:
But
the serversocket solution is cross-platform . And will not be vulnerable to the program crashing and not resetting the lock.