Might be, that I did not understand your question correctly, but I think you want to prevent the user from starting the same java application twice, correct?
If this is the case then unfortunately, you cant do this in a clean way.
A litte hack that you can use is to create a socket on a specific port, when this port is already in use then you can assume, that your application is already running. (or some other application which uses the same port) Its not nice and I wouldnt recommend it, but it gets the job done.