0

I created an application in java and I want it to run only once. If the application is already running, a messagebox should popup telling the user that the application is already running.

Any idea?

The Well
  • 876
  • 1
  • 9
  • 22

2 Answers2

0

You can check the running programs pid names for an instance of the current program.

Daniel Watt
  • 95
  • 1
  • 2
  • 10
0

Or

Run the application as an instance from another class and keep the check in the other class.

Vivek Aditya
  • 1,145
  • 17
  • 46