Creating single instance of application

Hi friendsI have swing applicationi want to create only one instance of itthat means on creating second instance it must show first instancethis is similar to yahoo messanger etcany help will be appreciated Thanks in advacce
[273 byte] By [it_shailua] at [2007-11-27 8:19:53]
# 1
The standard way to do this is to acquire a non-shareable resource like a server socket on a specific port. If your app fails to open a server socket on port 5678, it assumes there's already an instance of itself running.
Hippolytea at 2007-7-12 20:08:08 > top of Java-index,Java Essentials,Java Programming...
# 2
For windows, at least, JSmooth has a "make single instance only" command.but ya, the guy above me beat me to the best answer :P
taifunbrowsera at 2007-7-12 20:08:08 > top of Java-index,Java Essentials,Java Programming...
# 3

> that means on creating second instance it must show first instance

However, this problem still remains. I would like to ask: how do you go about showing the running app, since it is in another JVM? Is there a simple way of notifying the already running app that the a new one tried to run?

ICE

icewalker2ga at 2007-7-12 20:08:08 > top of Java-index,Java Essentials,Java Programming...
# 4
... well, earlier I wrote "server socket" :-)
Hippolytea at 2007-7-12 20:08:08 > top of Java-index,Java Essentials,Java Programming...
# 5
Server Sockets (Infact Sockets) Got It!!!ICE
icewalker2ga at 2007-7-12 20:08:08 > top of Java-index,Java Essentials,Java Programming...