Eclipse Opens Empty Workspace

I have this weird issue where the following happens:

  • new eclipse juno install (with all updates)
  • works fine for a while asking what workspace I want to open with a dialog at startup
  • after a few days, he stops asking me for the workspace, opens an empty, filled workspace, and not in / Users / myself / Documents

If I check "preferences → workspace → startup and shutdown" everything seems fine, the only workplace on the list is the one I created, and the checkbox that says "do not request workspace" is not checked .

This happened several times on new eclipse installations and fresh hard drives (the same machine, but I replaced the hard drive, reinstalled the OS and all for other reasons, and now it happened again).

I am:

  • OSX 10.7.5
  • Eclipse Juno (Service release 2)

Any help appreciated!

+7
source share
4 answers

I have exactly the same problem on OSX, for no reason, one day, Eclipse will start working with a new empty workspace!

And to all the stupid answers and defendants: YES I know how to set and select the default workspace! And NO creating a new workspace, re-importing a large number of projects and losing all of my 30+ database connections under my greedy extension is not an option.

I found out that

  • For some reason, Eclipse creates the directory /Users/user_name/Documents/workspace , which is the empty workspace that it starts with (wrong)
  • My regular workspace is under /Users/user_name/Documents/Development/eclipse

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

  • Go to the Eclipse directory where you run Eclipse (my is /Applications/eclipse )
  • In {eclipse_dir}/configuration open the config.ini file
  • Find the line osgi.instance.area.default=@user.home /... and confirm that it points to the directory of the fake workspace.
  • Change the path to this entry to indicate the correct workspace
  • Save the config.ini file.
  • Try starting Eclipse, and now it should open the workspace.
  • If your Eclipse is now loaded with plugins, go to your workspace directory and find the .metadata directory (its hidden). Inside the .metadata directory .metadata delete the .mylyn directory and restart Eclipse.
  • After starting Eclipse with the correct workspace, properly close Eclipse so that your workspace is closed and saved correctly.

This worked for Eclipse Juno.

Hope this helps!

+18
source

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

FYI this is due to the installation of some plugins.

+2
source

The same problem happened to me on Windows on two separate Eclipse installations without installing the plugin.

I managed to get the workspace by clicking File> Switch Workspace, but closing and opening Eclipse again will reset to the default workspace.

What apparently solved this was to force Eclipse to save the Workspace settings by checking “Prompt for workspace” when configuring startup in the General> Start and Stop> Workspaces section that I turned off.

The next time Eclipse opens, he asked me to create a Workspace, and he was the first on the list first. I asked not to request it again, and now it opens the correct workspace when I start Eclipse again.

+1
source

I solved this problem as JJ-za's answer, with the exception of steps 2 and 3:

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

  2. Find the line RECENT_WORKSPACES= and make sure that the workspace points to the correct workspace directory and that several workspaces are separated \n

0
source

All Articles