This content has been marked as final. Show 2 replies
1 person found this helpful
user8995776 wrote:Why would you run it twice if you want to run it only once?
When my Java program is running and I execute the same program again, I'd rather have the GUI of the running program show up instead of spawning a 2nd process.
You could for example create a .pid file in *NIX style, to see whether the program is already running or not.
Thanks, but when someone kills the application, the file remains.
Found a solution here:
If anyone knows a better approach, please let me know.