I have a javafx application started from web start via a link on a webpage. The SingleInstanceService works fine when I have a running instance and try to open another one. But when no instances are running, and I either double click a link on my webpage or a desktop link, two instances are started.
Windows 7, Java 7 u11
In the log files, I can see, that the two instances are started within less than 100 milliseconds. This is some of the console output from the instance that came last:
2013-01-29 14:03:17,246 [thread App-1] DEBUG App - SingleInstanceService found !
server running at port: 61065
temp: connect to: http://www.test.net/App.jnlp 61065
network: Connecting socket://127.0.0.1:61065 with proxy=DIRECT
temp: no server is running - continue launch!
basic: unique id: http://www.test.net//App.jnlp
basic: server port at: 61109
basic: getSingleInstanceFilename: C:\Users\me\AppData\LocalLow\Sun\Java\Deployment\tmp\si\http___www.test.net_App.jnlp-x86_61109
basic: file should be removed: C:\Users\me\AppData\LocalLow\Sun\Java\Deployment\tmp\si\http___www.test.net_App.jnlp-x86_61065
, as you can see, web start actually finds the marker file of the first instance, but just removes it.
Is this a bug ? How can I fix it ?
I could see, that the Java Control Panel also uses this technique. It also places a Single Instance File in C:\Users\me\AppData\LocalLow\Sun\Java\Deployment\tmp\si
When I place a shortcut to the JCP on the desktop, I can launch 2 instances if I press the enter key twice real fast. So it must be a bug somewhere.