Eclipse opens blank workspace
Asked Answered
P

4

7

I have this weird issue where the following happens:

  • fresh eclipse juno install (with all updates applied)
  • works fine for a while asking which workspace I want to open with a dialog on startup
  • after a few days it stops prompting me for workspace, opens blank made up workspace instead in /Users/myself/Documents

If I check "preferences -> workspace -> startup and shutdown" everything seems fine, the only workspace in the list is the one I created and the checkbox that says "don't prompt for workspace" is not checked.

This happened a few times already on fresh eclipse installations and fresh hard drives (same machine but I replaced the hard drive, re-installed OS and everything for other reasons and now it happened again).

I am on:

  • OSX 10.7.5
  • Eclipse Juno (Service release 2)

Any help appreciated!

Pentobarbital answered 24/4, 2013 at 12:55 Comment(3)
To whomever is voting to close to this question - please let me know where I am supposed to post it if not here. Getting an IDE to work properly is clearly programming related.Pentobarbital
Did you try programmers' stackexchange?Culpepper
@AdrianPanasiuk no, because the question belongs here.Pentobarbital
A
19

I have exactly the same problem on OSX, for no reason, one fine day, Eclipse will start-up with a new blank workspace!

And to all the stupid answers and responders out there: YES I know how to set and select a default workspace! And NO creating a new workspace, re-importing lots of projects and loosing all my 30+ database connections under my Toad Extension, is not an option.

What I found is that

  • For some reason Eclipse creates a directory /Users/user_name/Documents/workspace which is the blank workspace it starts-up with (incorrectly)
  • My usual workspace is under /Users/user_name/Documents/Development/eclipse

The solution is (this is on Mac OSX, don't know if it is the same on Windows):

  1. Goto your Eclipse directory where you run Eclipse from (mine is /Applications/eclipse)
  2. In {eclipse_dir}/configuration open the file config.ini
  3. Find the line [email protected]/... and confirm that it is pointing to the bogus workspace directory.
  4. Modify the path of this entry to point to the correct workspace
  5. Save the config.ini file.
  6. Try starting Eclipse and it should open your workspace now.
  7. If your Eclipse get stuck loading plugins now, goto your workspace directory and look for the .metadata directory (its hidden). Inside the .metadata directory, remove the .mylyn directory and restart Eclipse.
  8. Once Eclipse started with the correct workspace loaded, do a proper Eclipse shutdown to ensure your workspace is closed and saved properly.

This worked for Eclipse Juno.

Hope this helps!

Alienism answered 10/6, 2013 at 9:56 Comment(3)
thanks! Will give it a shot, and let you know if it does the trick for me too :)Pentobarbital
I forgot to mention, this is for Eclipse JunoAlienism
Still broken in Mars.2, and your solution still works.Kathernkatheryn
E
2

Just running this command helped me eclipse.exe -data C:\Development\Eclipse\Workspace

FYI this happens due to install of some plugins.

Equivalence answered 1/8, 2013 at 3:55 Comment(0)
I
1

This same problem happened to me on Windows on two separate Eclipse installations, without installing any plugin.

I was able to get my working Workspace by clicking on File > Switch Workspace, but closing and opening Eclipse again would reset it to a default Workspace.

What apparently solved this was to force Eclipse to save Workspace settings by ticking the Prompt for workspace on startup setting in General > Startup and Shutdown > Workspaces, which I had turned off.

The next time Eclipse opened, it asked me for the Workspace, and it had my correct one first in the list. I asked not to be prompted again for it and now it opens the right workspace when I launch Eclipse once again.

Illinium answered 14/5, 2014 at 8:6 Comment(0)
C
0

I solved this problem as per JJ-za's answer, except steps 2 and 3:

  1. In {eclipse_dir}/configuration/.settings open the file org.eclipse.ui.ide.prefs (when Eclipse is not running)

  2. Find the line RECENT_WORKSPACES= and confirm that the workspace is pointing to the correct workspace directory and that multiple workspaces are separated by \n

Colemancolemanite answered 5/6, 2015 at 11:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.