Make Eclipse launch from a specified workspace

I couldn’t seem to make eclipse launch from the workspace I was using. No matter how I tried setting the defaults, it simply would not load from the last workspace used, and kept reverting to the default workspace (which was empty).

Rather than using Switch Workspace all the time (which is a pain, because it restarts Eclipse each time), it’s quicker just to change the configuration file.

This file is called config.ini and you can find it in the configuration directory of your Eclipse installation:

osgi.instance.area.default=C\:\\Workspace

Change the default value of this row to the path of your workspace.


Alternatively, you can run Eclipse from the command line using the -data tag, which lets you manually choose the desired workspaces.

eclipse -data C:\Workspace
Advertisements

How to Change Eclipse Workspace

How to change an Eclipse Workspace?

Using Eclipse 3.7 (Indigo) over Windows 7, this method works for me:

File -> Switch Workspace -> Other. Type in new workspace name. Once in the new workspace, click File -> Import… and under General choose “Existing Projects into Workspace. Press the Next button and then Browse for the old projects you would like to import. Check “Copy projects into workspace” to make a copy.

The next option *should also* work, but it doesn’t seem to work on my computer. Eclipse voodoo?

Try Preferences -> General -> Startup and Shutdown -> Workspaces. Make sure that the “Prompt for workspace on startup” box is checked. Close  Eclipse and reopen. You should be prompted for the workspace on startup.

Let me know if this works for you, and if so, how!


After transferring the workspace, make sure your compilers are still working and the library paths haven’t changed. I had to reconfigure my Python interpreter, but the C++ CDT compiler seemed to survive the transfer okay.