How to change the Eclipse default workspace?

Eclipse

Eclipse Problem Overview


Where can I change the default workspace in Eclipse?

Eclipse Solutions


Solution 1 - Eclipse

If you mean "change workspace" go to File -> Switch Workspace

Solution 2 - Eclipse

I took this question to mean how can you change the Default workspace so that when Eclipse boots up the workspace you want is automatically loaded:

  • Go under preferences then type "workspace" in the search box provided to filter the list. Alternatively you can go to General>Startup and Shutdown>Workspaces.
  • There you can set a flag to make Eclipse prompt you to select a workspace at startup by checking the "Prompt for workspace at startup" checkbox.
  • You can set the number of previous workspaces to remember also. Finally there is a list of recent workspaces. If you just remove all but the one you want Eclipse will automatically startup with that workspace.

Solution 3 - Eclipse

  1. Go to eclipse\configuration\

  2. Open the file "config.ini"

  3. Modify the line

     osgi.instance.area.default="F:/Workspace/Java"
    

where "F:/Workspace/Java" should be your default workspace!

Solution 4 - Eclipse

If you are talking about changing the working directory for a java program that you launch from within eclipse, then there's a space for that in the run configuration. If you go to Run menu and select "Run Configurations..." then select your run configuration, then on the "Arguments" tab for a Java Application there is a place for you to edit the "Working directory". This alters the current directory that will be used for launching the java program.

See related question https://stackoverflow.com/questions/981213/default-eclipse-working-directory if this is what you are meaning.

Solution 5 - Eclipse

Whatever Frank has suggested to change in config.ini is correct. In case, if that didn't help, you need to remove path from recent workspace as below.

  1. Go to eclipse\configuration\org.eclipse.ui.ide.prefs\

  2. Open the file "org.eclipse.ui.ide.prefs"

  3. Remove the first path in RECENT_WORKSPACES.

    MAX_RECENT_WORKSPACES=5 RECENT_WORKSPACES=/Users/wrokspace1\n/Users/wrokspace2\n/Users/wrokspace3\n/Users/wrokspace4 RECENT_WORKSPACES_PROTOCOL=3
    SHOW_WORKSPACE_SELECTION_DIALOG=false
    eclipse.preferences.version=1

Solution 6 - Eclipse

File > Switch workspace > add the workspace you like > Eclipse will restart using the workspace you wanted.

Solution 7 - Eclipse

If you mean to change the directory in which the program execution will occur, go to "Run configurations" in the Run tab.

Then select your project and go to the "Arguments" tab, you can change the directory there. By default it is the root directory of your project.

Solution 8 - Eclipse

Open a command prompt. Change to the eclipse home directory and type "eclipse -clean" e.g. C:/eclipse>eclipse -clean

This will ask for the workspace selection. It will also force to set it as the default workspace.

Then, go to eclipsehome-->configuration-->settings folder.

open org.eclipse.ui.de.prefs in a notepad.

set this property to true from false.

SHOW_WORKSPACE_SELECTION_DIALOG=true

You will be asked for a workspace selection everytime.

Solution 9 - Eclipse

If you want to change recent workspace manually in a configurationfile org.eclipse.ui.ide.prefs exists in

eclipse > configuration > .settings > org.eclipse.ui.ide.prefs

open this file in an editor find RECENT_WORKSPACES in line #2 and in this line you can see recent workspaces and can change or even remove them.

Solution 10 - Eclipse

In Eclipse, go to File -> Switch Workspace, choose or create a new workspace.

Solution 11 - Eclipse

This is the only answer you got first when you search for default workspace, but any solution is not solved my problem, So I follow this step for a default workspace:

  1. First copy shortcut icon for your eclipse.
  2. Right click and go to properties, add your workspace path with -data attribute,

In Target:

D:\eclipse_path\eclipse.exe -clean -data D:\workspace_path\workspace

enter image description here

For using the same shortcuts and preference into this workspace, Export general --> preference from your working eclipse, it will generate one .epf file.

So, just import .epf file into your new workspace, and you are done.

enter image description here

Solution 12 - Eclipse

If you want to create a new workspace - simply enter a new path in the textfield at the "select workspace" dialog. Eclipse will create a new workspace at that location and switch to it.

Solution 13 - Eclipse

On Ubuntu I went to

~/.eclipse/org.eclipse.platform_4.3.0_1473617060_linux_gtk_x86_64/configuration/config.ini 

and added this line at the bottom

osgi.instance.area.default[email protected]/workspace

and changed workspace to the dir path from my home to where I put my workspace.

I combined @Frank answer with @Ronan Quillevere's comment

Solution 14 - Eclipse

My kepler eclipse went into not responding at boot (shortly after installing GAE support) which I traced to a corrupt workspace. I fixed this by closing kepler, renaming the workspace directory (in use) so kepler starts normally without a workspace, then used file >> switch workspace to generate new workspace. Then started populating that with my old projects that I still needed.

Solution 15 - Eclipse

You can check the option that shows up when you start eclipse. Please see the figure below

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser496949View Question on Stackoverflow
Solution 1 - EclipseManrico CorazziView Answer on Stackoverflow
Solution 2 - EclipsejsealsView Answer on Stackoverflow
Solution 3 - EclipseFrankView Answer on Stackoverflow
Solution 4 - EclipseTom QuarendonView Answer on Stackoverflow
Solution 5 - EclipsesowmiaView Answer on Stackoverflow
Solution 6 - EclipseNeetsView Answer on Stackoverflow
Solution 7 - EclipseDunarilView Answer on Stackoverflow
Solution 8 - Eclipseuser2869735View Answer on Stackoverflow
Solution 9 - EclipseHadi RasouliView Answer on Stackoverflow
Solution 10 - EclipseJorgesysView Answer on Stackoverflow
Solution 11 - EclipsebharatpatelView Answer on Stackoverflow
Solution 12 - EclipseAndreas DolkView Answer on Stackoverflow
Solution 13 - EclipseJerinawView Answer on Stackoverflow
Solution 14 - Eclipseandrew pateView Answer on Stackoverflow
Solution 15 - Eclipselordzeus1989View Answer on Stackoverflow