Community
Participate
Working Groups
It is possible to run multiple instances of Eclipse 1.0. A fix was created for builds after Oct 4 2001: JohnA (10/2/2001 5:09:32 PM) Fixed. Solution was to create a lock file, and open a file handle using java.io.RandomAccessFile. Then, the second instance tries to delete the file, and does not succeed because the other instance has the file open. This works and has been tested on WinNT, both NTFS and FAT32. I suspect this may not work on Linux. Fix in builds >202. I believe this will not work on Linux. A possible alternative is to test whether a file exists or not (like VAJava's busy.sav file). If you're the first instance, you create the file; if you're the second instance, you detect it and refuse to start up. The first instance must also delete the file at exit. This should work on both Linux/Unix and Windows. -> if the file exists when you start, you should prompt with a nasty dialog: "It looks as if Eclipse is already running here. If it is, you could be shooting yourself in the foot. Do you really want to start?" just in case the last time Eclipse ran it terminated unexpectedly and was unable to delete the file.
We explored that option, but popping up a dialog is not possible until after the runtime startup process is over, which is too late. Besides, having such a dialog pop up really isn't very nice. It was possible to print the nasty message to the console, but the console usually isn't visible in a typical user configuration so this doesn't help. The current approach is really the best we could come up with. It was felt to be more important to have the protection on Windows, as Linux users are more accustomed to an environment that generally just lets you shoot yourself in the foot.
Won't fix.
I tested this fix on the Rollup 2 on Release 1.0 on Windows, and it looks like we stop the user from opening an second instance of the workbench on the same workspace. Thanks!
*** Bug 21589 has been marked as a duplicate of this bug. ***