title: Running only single instance of Executable Jar file
body: <p>So i have packaged my project as a single executable jar that works fine. But at times it happens that the user launches the file multiple times, and this causes it to launch multiple instances of same project (causing unexpected behavior e.g overwriting values in files by delayed instances of project).  </p>
  
  <p>I want to know for a windows platform (Win7), what are the options to lock the execution for only one time, and then if the jar is already running, simply don't proceed executing the code again.  </p>
  
  <p>I read about Process ID's but if there are multiple java app's they all end up showing imagename as javaw.exe and how can i determine own process id??  </p>
  
  <p>Please suggest what is the proper way of doing this thing, thank you!!</p>