I want my program, a Java executable .jar, to be run just once. I made a program but now I want users not to be able to open more than one instance ....thanks for your time.
You can use a lock file solution. On startup of the application, have it check for a specific file. If it doesn't exist, create it and start the application normally. If it does exist, exit the application. You need to ensure the file is deleted when the application shuts down (maybe using a FileLock).