82

I am currently using Eclipse for both Java and Python (with PyDev). I often find that I have one Java project open with lots of files, and then for some reason I have to switch to a Python project for a bit.

I want to leave my Java project the way it is, and I don't just want to open tons of Python files in the same place because then I have too much open at once.

Is there any way I can leave my Java project exactly the way it is, and open a completely new session of Eclipse? (sort of the way you can do with a browser)

Stevoisiak
  • 16,510
  • 19
  • 94
  • 173
froadie
  • 71,770
  • 69
  • 154
  • 228
  • possible duplicate of [eclipse : how to differentiate/distinguish different open workspaces](http://stackoverflow.com/questions/2282384/eclipse-how-to-differentiate-distinguish-different-open-workspaces) – Eric J. May 28 '10 at 16:59
  • 2
    For those voting to close and send to SuperUser, it doesn't seem to really belong there. However, this is a duplicate of e.g. http://stackoverflow.com/questions/2282384/eclipse-how-to-differentiate-distinguish-different-open-workspaces – Eric J. May 28 '10 at 17:00
  • @Eric This seems almost completely unrelated to [2282384](http://stackoverflow.com/questions/2282384/eclipse-how-to-differentiate-distinguish-different-open-workspaces); that one is about how to indicate the current workspace in the window, this is about having multiple windows open at once. I was one of the votes to migrate, because this doesn't have anything to do with programming -- it's about an IDE, but about managing windows in it, which is a generic "how to use this piece of software" question. It's kind of a gray area I suppose – Michael Mrozek May 28 '10 at 17:04
  • 2
    Sorry, was just looking for the Window->New Window capability, didn't realize it was so simple and shouldn't have assumed it can't be done. I don't see it as a duplicate of any of the ones listed, though, but you can close it if you think so – froadie May 28 '10 at 17:07

7 Answers7

134

If you want two instances accessing two workspaces, just run a second copy of eclipse

If you want two windows accessing the same workspace, you can create a second window with Window -> New Window

Michael Mrozek
  • 149,906
  • 24
  • 156
  • 163
  • 2
    one more question - it seems to remember the last one you have open. (when you open eclipse the next time, that's what it restores.) Is there any way to make it remember and reopen both windows? – froadie May 28 '10 at 17:33
  • 1
    @froadie: The only way I know of is to let the OS shut Eclipse down, rather than shutting it down yourself. – Powerlord May 28 '10 at 17:41
  • @froadie I don't know, but that behavior bothers me too. It might be worth posting a separate question for it – Michael Mrozek May 28 '10 at 18:07
  • You can also hit File -> Exit and it will remember multiple windows. The downside is that if you accidentally close one window, it will just be gone. – Z O. Oct 12 '12 at 22:39
  • On OSX you can load a new instance of Eclipse by running `/Applications/eclipse/eclipse` from the terminal – donturner Nov 21 '13 at 23:08
  • 3
    Note: If you want two instances accessing two workspaces, some versions of Mac OS X make this difficult. I would highly recommend using this plug-in: https://marketplace.eclipse.org/content/os-x-eclipse-launcher (discovered via: http://stackoverflow.com/a/12640550/857125 ) – chaqke Feb 18 '16 at 19:58
  • @MichaelMrozek but it won't solve our problem updating anything such as Open Resource's working set, or Search Working set, it is getting reflected in another window – dextermini Sep 27 '16 at 06:03
  • I would +1000 if I could. It is a so obvious menu entry that I did never, ever, saw it. – Benj Sep 06 '17 at 07:30
  • 1
    thank you @chaqke for the plugi-in recommendation. I needed to have two instances with different workspaces and this solved my issue on Mac! – Erfan GLMPR Jul 14 '20 at 13:47
  • I doesn't work for me. *New Window* only create an Eclipse instance of the same workspace. If I change the workspace in one of them, all are closed and gives me the single instance of the changed workspace. – Avin Shum Mar 29 '21 at 03:43
  • @AvinShum That's what the answer says. If you want two different workspaces, see the first sentence. – Michael Mrozek Mar 29 '21 at 06:11
10

Yes, you can. Otherwise, no one could develop an Eclipse plug-in.

You have to uncheck the default workspace on startup. You can't have two instances of Eclipse referencing the same workspace.

Gilbert Le Blanc
  • 45,374
  • 5
  • 61
  • 107
  • I want to use the same workspace, just different projects separately. My question was somewhat misleading, though - I don't really need a whole separate instance, just a separate window. I didn't realize that till I saw the answers though. Thanks for the help! – froadie May 28 '10 at 17:10
  • @Gilbert: What do you mean by "Otherwise, no one could develop an Eclipse plug-in."? – Abhishek Singh Apr 23 '17 at 11:44
  • @AbhishekSingh It probably meant that someone developing an Eclipse plugin needs two instances of Eclipse open: one for actually writing the code that is the plugin, and another for testing the plugin. – Joshua Taylor Aug 24 '17 at 15:43
  • How about 2x copy of Eclipse from different directories? – Yousha Aleayoub Mar 10 '18 at 23:38
4

Yes, you can have two instances of Eclipse running at the same time. However, they can't both access the same workspace at the same time. If you try to do this, the second instance will complain about it on startup and ask you to choose a different workspace.

Also bear in mind that Eclipse tends to be a very memory-hungry application. Running two at once may put a significant strain on your system.

Syntactic
  • 9,453
  • 1
  • 22
  • 25
1

I was able to debug two simultaneous instances by copying the whole workspace folder and running a new copy of eclipse using that folder.

Andrei Pokrovsky
  • 2,718
  • 1
  • 24
  • 16
1

This is what I did.

  1. Go to the folder from where Eclipse is installed.
  2. Click on eclipse Application once.
  3. When it asks to select workspace, 1st go back to directory and click on eclipse application again. It will ask for another workspace selection dialog.
  4. Now you can enter 2 different workspace and work simultaneously.

Check the directory image here

Shachi
  • 1,708
  • 3
  • 22
  • 39
0

As long as each project uses its own workspace, yes, you absolutely can. This assumes that your system has sufficient memory and CPU resources to accommodate multiple instances, of course. (I do it all the time!)

Danny Whitt
  • 1,123
  • 14
  • 21
0

If you want to open different work spaces with different projects then Window -> New Editor; here you can open different work space with different project.

Custadian
  • 843
  • 1
  • 10
  • 35