I have a Windows batch file(.bat) which launches my GUI(Swing) application. I want to make sure only one copy of my application should be running at any time. For example, assume that I have launched my application by running the batch file. Now if i try to execute the batch file it should not launch application and it should say something like "Application already running".
You may also write a temp file, there is a way to turn a �delete on exit flag� so your file will erase itself when your program exits. Every time you start your process you can try to find the file, if it exists you show your message and exit else you continue the normal way.
She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Always! Wait. Never. Shut up. Look at this tiny ad.