I want to prevent multiple instances of application being launched in java. I know 2 methods for this:
But
If you deploy with Java WebStart the SingleInstanceService does this.
See http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/faq.html#218