java Swing Application start only one time, how to restrict ?

hi

I have to trouble to start application only once, how to restrict , I have to open different command prompt and run my application the first command prompt run successfully , and I want the second command prompt run the same application , this will not run. this will be give an error message , how to design this arch. for swing application . any one code with explain me

Thanks and regards

SASIKUMAR

[429 byte] By [SASIMSITa] at [2007-11-27 4:56:57]
# 1

maybe you can something like this:

- your application opens a port (i.e.: 14999)

- in your main, you check if the port is open ; it it's open, then the app is already launched and you System.exit(0); else, you launch the application (and opens the port)

Message was edited by:

calvino_ind

calvino_inda at 2007-7-12 10:12:17 > top of Java-index,Java Essentials,Java Programming...
# 2
Double-post: http://forum.java.sun.com/thread.jspa?threadID=5174618
kajbja at 2007-7-12 10:12:17 > top of Java-index,Java Essentials,Java Programming...