29

After installing eclipse and opening for the first time, I had specified a workspace and selected the checkbox, which says, 'use this as default workspace'.

From then, when I was opening eclipse, it doesn't ask for workspace and loads the default workspace which I had specified before. I want to change this default workspace.

I don't want it to open the workspace, and then to switch to the one I need. How can I change the default workspace?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Anuj Balan
  • 7,629
  • 23
  • 58
  • 92

11 Answers11

43
  • Uncheck this and apply your changes-

    Windows Preferences->General->Start up and Shut down->Workspaces->Check Prompt For workspace on start up

  • Apply and OK

  • Close the eclipse.

  • Open eclipse

  • Give your new workspace path and choose it as default.

sgowd
  • 2,242
  • 22
  • 29
27

As all the other answers don’t seem to satisfy you I am wondering what it is that you really want. So I will add another option: use the command-line parameter “-data” to specify a location for the workspace. With this you can create several launchers/shortcuts that will open different workspaces.

$ eclipse -data $HOME/workspace/
Bombe
  • 81,643
  • 20
  • 123
  • 127
22

In the path

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

Change the Order of workspace here

RECENT_WORKSPACES=F\:\\new workspace\nF\:\\worksapce
Shiva Saurabh
  • 1,281
  • 2
  • 25
  • 47
Pradeep
  • 221
  • 2
  • 2
8

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.

shivadarshan
  • 896
  • 2
  • 15
  • 25
4

You can select "Prompt for workspace on startup" in the preferences at "General" -> "Startup and shutdown" -> "Workspaces" and then restart, setting your new default workspace.

Abrixas2
  • 3,207
  • 1
  • 20
  • 22
3

Open Eclipse, follow File => Switch Workspace => Other => Browse

Select the directory that you wanna use as a workspace, then click OK. Eclipse will be restarted and you will be able to work in your new workspace. If you wanna add new workspace(s) follow the same method explained above. Your all workspaces will be listed after Switch Workspace option, so you will be able to easily select your previous workspace(s). Your recent workspace will be your default workspace.

Juvanis
  • 25,802
  • 5
  • 69
  • 87
2

For Neon Eclipse following, I did following thing and it worked out properly.

Modify osgi.instance.area.default="your preferred workspace folder" in $ECLIPSE_HOME/configuration/config.ini file.
Please take note that while mentioning your workspace folder ,path should be absolute path and in Unix style.
For example if your workspace folder is: C:\Workspace in windows, then above value will be like below:

osgi.instance.area.default=C:/Workspace
Ichigo Kurosaki
  • 3,765
  • 8
  • 41
  • 56
RWork
  • 41
  • 3
1

It works for me:

Fix 1:

  • how to force eclipse to open default workspace automatically or ask for default workspace when open your eclipse
  • Click Window –> Preferences
  • Click General –> Startup and Shutdown –> Workspace
  • List item

Fix 2:

  • Go to your eclipse home
  • Send your eclipse.ext to desktop shortcut
  • Now go to desktop and right click it — click properties
  • In target input box append target location with -clean command
  • Double click eclipse shorcut to open
user3468976
  • 629
  • 7
  • 4
  • You can do the same by opening a command prompt in the eclipse folder, and type "eclipse -clean". This will allow you to set a default workspace, as indicated in other answers. – rakensi Apr 25 '14 at 07:21
1

Buried in the eclipse folder there is a settings file somewhere that has this option set, it also has a list or the workspace history. Just delete this and you will be allowed to select a new location. U can also delete the .metadata folder in your workspace (will lose ur prefs) or just move that workspace folder to a new location all together. I think Eclipse will prompt u in all these situations.

jjNford
  • 5,170
  • 7
  • 40
  • 64
0

I had this problem on MacOs. When I installed STS, I copied its sts-bundle folder to the Applications directory and launched STS using the STS.app file. When I started it up, it repeatedly prompted me for the workspace file even though I changed the preferences to not do this.

Finally, what worked for me was to right-click the application while it was in the dock and choose "keep in dock" from the options menu. Now, if I start STS using the icon on the dock, I am no longer prompted for the workspace every time.

David Choweller
  • 1,060
  • 1
  • 8
  • 7
0

Go to Window/Preferences/Workspace/Startup and Shutdown.

Uncheck prompt for workspace. It worked.

Anuj Balan
  • 7,629
  • 23
  • 58
  • 92
  • While searching through preferences, found the option, under workspace. – Anuj Balan Mar 06 '12 at 06:59
  • But I don't want to waste time waiting for eclipse to load, then switch, and then wait for the eclipse to restart with new workspace. – Anuj Balan Mar 06 '12 at 07:01
  • with this option, it says shutdown. then you are again waiting for restart, load. with my answer all selected workspaces are listed in the menu and if you have many workspaces(10, 20 whatever) you are able to select one of them at any time. – Juvanis Mar 06 '12 at 07:04