Re: only one instance



Chameleon wrote:
I want only one running instance of my app.


1. sockets
2. locking files (I prefer this)


When I run the 2nd instance of App with a file parameter:

my_app.jar  a_file.txt

I want to pass "a_file.txt" to 1st instance for opening and then 2nd instance terminate.

The obvious solution is to use the socket method of running a single instance of the app. The second app then connects to the socket and transfers the filename.


Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
.