title: How to check if two instances of the same java program are running?
body: <p>Hi am making a program which will run through javaw.exe, so that it is not visible directly. Now my issue is sometime, (accidently) it can happen that the user runs multiple instances of the same application,  </p>
  
  <p>e.g entering <code>javaw myProgram</code> two times  </p>
  
  <p>Under such situation, is there any way i can prevent multiple instances of the same program to run if the program is already running.</p>