Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check multiple instance of an application

Status
Not open for further replies.

RSPSarathy

Programmer
Apr 29, 2002
6
IN
Hello Friends,

I have a Java Application (EXE file) and am running it and am leaving it open.

Again, I run the same EXE it SHOULD NOT be executed since the process is running already. How to check whether the same app is running before (Something like checking the windows task manager) and prevent the second time execution ?

Take MSN IM for example - it runs only one instance.

How to do this in Java, if feasible.
 
Hi
One way to check if an application is running is openning a socket on a certain port with your application and then check whether the prot is open or not before running your application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top