Bug 139319 - Cannot launch multiple Eclipse instances
Summary: Cannot launch multiple Eclipse instances
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-28 17:52 EDT by Vincenz Braun CLA
Modified: 2015-07-01 16:57 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincenz Braun CLA 2006-04-28 17:52:06 EDT
Under windows starting the same eclipse installation again prompts the message: 
workspace is already in use choose another one. If yo choose another you can simlutaneously
work with more than one workspace at a time. 

Under MacOS no such dialog appears. Starting the application again does nothing. (Seems
to be normal MacOS behaviour. I am currently switching and new to the Mac.) In eclipse itself
there is only the possibility to switch the workspace. This is not enough. A option to start a new
workspce is desperately needed. E.g. for working on different branches.
Please fix this before final 3.2.
Comment 1 Pascal Rapicault CLA 2006-04-28 22:41:50 EDT
Could you precise which build of eclipse you are running and which version of macos x you have?
Silenio do you think this could be caused by the recent changed in the launcher?

Marking for RC3 to make sure we investigate.
Comment 2 Vincenz Braun CLA 2006-04-28 22:44:02 EDT
I am using eclipse 3.2M6 under MacOS 10.4.6 with an Intel based MBP.
Comment 3 Pascal Rapicault CLA 2006-04-28 22:49:06 EDT
Could you give a try to RC2 that has just been made available?
Comment 4 Vincenz Braun CLA 2006-04-29 07:34:35 EDT
Exactly the same behaviour with RC2. Could not start eclipse a second time. BTW there is
not even an startup animation. Simply nothing happens.
Comment 5 Andre Weinand CLA 2006-05-01 08:45:50 EDT
On MacOS you can only launch a UI program more then once if you have separate copies of the program on disk. The reason for this behavior is that every UI application on Mac can open multiple documents, so typically there is no need to open a program "twice".
Since Eclipse cannot open more than one workspace, this means you have to make a copy of the Eclipse install if you want to open more then one workspace at the same time.

Since this behavior (and the workaround) is fairly standard for Mac programs that cannot deal with multiple documents, I don't consider this issue as a "major bug" (and I don't see a need to fix this for 3.2).

Pascal, what exactly happens with the "configuration" folder in the case that not the Eclipse install is duplicated but just the tiny Eclipse.app (<200k)? What happens on Windows in that case?
Comment 6 Pascal Rapicault CLA 2006-05-01 10:11:18 EDT
Strange... I thought that use to work with eclipse 3.1, but I would not bet :-)

>What exactly happens with the "configuration" folder 
 The contract of the configuration folder is that it can be shared across multiple eclipse instances running simultaneously. Therefore, readers and writers must take the appropriate precautions.
Comment 7 Oleg Besedin CLA 2006-05-01 10:16:18 EDT
Please keep in mind that there are some issues with running multiple instance of Eclipse using the same configuration location (assuming configuration is not specified as a read-only). The bug 129365 has some details.
Comment 8 Thomas Watson CLA 2006-05-01 10:39:53 EDT
bug 129365 is about running multiple instances of eclipse from an uninitialized eclipse configuration.  It is always recommended to initialize eclipse (using -initialize option) before launching multiple instances from the same configuration.
Comment 9 Andre Weinand CLA 2006-05-01 11:29:03 EDT
Thanks for the info about the "configuration" folder.

So this means the safest way to have more than one workspace open, is to make *full copies* of an Eclipse install directory and run the corresponding Eclipse.app with diffreent workspaces.

And the adventurous can just make a copy of Eclipse.app inside the Eclipse install, and hope that they won't corrupt the (shared) configuration directory... (I'm doing this all the time and cannot remember having any problems with this).

May be this is something for the Eclipse ReadMe? 
Comment 10 Randy Hudson CLA 2006-05-01 11:45:40 EDT
If you can't run an app twice, how would you launch a runtime workbench for self-hosting?
Comment 11 Silenio Quarti CLA 2006-05-01 12:32:38 EDT
>Silenio do you think this could be caused by the recent changed in the
>launcher?

No, this is not new. This happens in 3.1.x.
Comment 12 Andre Weinand CLA 2006-05-01 13:11:50 EDT
Randy, the fact that a UI application can only run once is not a OS limitation X but just a UI concept of the Mac OS Finder: double clicking (launching) iTunes does not start a second instance of iTunes. So the Finder (via the LaunchManager) tracks that not multiple instances of an application are running (and the Dock shows this: there is only a single icon for iTunes or MS Word even if multiple documents are open).

However, if you start applications via regular Unix concepts ("exec") as we do in Eclipse, multiple instances of the same executable are possible. 
Comment 13 Pascal Rapicault CLA 2006-05-01 13:22:01 EDT
Re comment #12.
Sharing the configuration has nothing of adventureous :-) This is a supported feature since 3.0 and any bug in this space should be reported.

Decreasing priority but leaving open to add an entry in the readme as Andre suggested.
Comment 14 Vincenz Braun CLA 2006-05-01 14:07:56 EDT
Only a documentation hint for mac os users?
That is disappointing. Is the option to start a new
workspace from eclipse such a huge task? Would be nice
to see this at least in 3.2.1 :-)
Comment 15 Pascal Rapicault CLA 2006-05-01 14:34:22 EDT
It will stay a readme until someone from the community provides a patch :-)
Comment 16 Andre Weinand CLA 2006-05-01 14:59:00 EDT
Yes, MacOS X and Windows behave differently when it comes to launching multiple instances of the same application. Since Eclipse does not support multiple workspaces within one application process (the "Mac" way), the Mac version of Eclipse would have to fork new processes to simulate the Windows behavior (I'm not sure about the Linux behavior). This would require Mac specific code in the Eclipse launching mechanism, which albeit possible, is not a small task...
 
BTW, you are the first asking for this, so it does not seem to be a big issue for Mac users...
Comment 17 Vincenz Braun CLA 2006-05-01 15:28:23 EDT
I found running this script works too. No Workspace switching and no splash screen.
Any other features that I loose when starting elcipse without the starter?

I think copying only the Eclipse.app folder will be my preferred way.
Thank you all very much for your support and patience.

#!/bin/bash
java  -Xbootclasspath/p:plugins/org.eclipse.jdt.debug_3.2.0.v20060329b/jdi.jar \
-XstartOnFirstThread \
-Xms40m \
-Xmx256m \
-Dorg.eclipse.swt.internal.carbon.smallFonts \
-Dorg.eclipse.swt.internal.carbon.noFocusRing \
-jar startup.jar -os macosx -ws carbon -arch ppc -name Eclipse -showsplash 600 -exitdata 70000 -vm /usr/bin/java
Comment 18 Jeff McAffer CLA 2006-05-01 22:16:46 EDT
re comment 13.  Exactly!  I regularly run 3-5 copies of the same Eclipse configuration but on different workspaces.
Comment 19 Pascal Rapicault CLA 2006-06-01 18:04:08 EDT
The readme will be released for 3.2. Leaving this bug open as the real problem is  not solved.
Comment 20 hc CLA 2006-10-12 03:41:28 EDT
open a terminal and cd to the eclipse folder, run ./eclipse& to start another instance. (under 10.4.x)
Comment 21 Andre Weinand CLA 2006-10-12 06:35:55 EDT
Or just duplicate the Eclipse.app and edit its Info.plist file.
Then you can launch multiple instances by double clicking.
Since Eclipse.app is small (164k), duplication should not be a problem.
Comment 22 Lachlan Deck CLA 2007-04-25 02:57:14 EDT
In order to work as expected on the Mac platform there would need to be:
a) an additional option in the file menu: "Open workspace..." to compliment "Switch workspace"
b) workspaces treated as documents (and thus available by name in the Window menu)
c) configuration settings not saved in eclipse/configuration/.settings but in ~/Library/Application\ Support/eclipse and thus leaving the installed application clean. Also default to installing plugins/features here (unless an admin user selects otherwise)
d) user preferences stored in ~/Library/Preferences/org.eclipse.eclipse.plist to be a standard plist.
e) etc.

Making copies of Eclipse.app is a fiddly hack compared to a simple menu option to open an additional workspace.
Comment 23 Alex Blewitt CLA 2007-04-25 08:17:51 EDT
Re: comment #22, this bug isn't about the fact that it's not laid out like a proper Mac application; there's a separate bug for that.
Comment 24 Lachlan Deck CLA 2007-04-25 20:14:56 EDT
As I understand it, this bug is about the option to run multiple workspaces *from within* eclipse is a missing feature. I have simply commented on the items that would need to accompany any fix for that.
Comment 25 Eclipse Webmaster CLA 2007-07-29 09:19:41 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991
Comment 26 Martin Oberhuber CLA 2008-08-27 11:38:28 EDT
Most of this bug has been revolving around how to start multiple instances of Eclipse, so I found the summary misleading and changed it (previous value was:

   Could not run multiple workspaces simultaneously

I have started bug 245399 to discuss the real ability of a single Eclipse instance to open multiple workspaces simultaneously, with a reference to comment #22 here.

I'm wondering whether this bug can be closed now, referencing the README for Mac that has been added as per comment #19? Also, I was not sure whether a "depends on" bugzilla dependency to the new bug should be added.
Comment 27 John Arthorne CLA 2008-08-27 14:38:42 EDT
Ok, closing. No point having two bugs with a similar subject.