[eclipse] How to force Eclipse to ask for default workspace?

I noticed that after installing cdt, Eclipse always loads the default workspace. The workspace listed in the config.ini in osgi.instance.area.default. Eclipse does not ask which workspace to open regardless if Prompt for workspace on startup is set or not.

How do I force Eclipse to ask which workspace to load on startup?

This question is related to eclipse eclipse-cdt workspace

The answer is


It works for me if I tick the box 'Prompt for workspace on startup', which you find in Window > Preferences > General > Startup and Shutdown > Workspaces.

HTH


I can confirm that I am having the same issue. I am also using eclipse classic with CDT. The funny thing is that it only started happening earlier this evening. Before then, I was always prompted for the workspace. Checking "Prompt for workspace on startup" has no effect. I am not launching eclipse using a startup script, so the -data flag is not set on launch. I have removed the line "osgi.instance.area.default" from the configuration/config.ini, but that had no effect.

A few strange quirks that are incidental to this problem: If I delete the "workspace" workspace it creates it again upon launch. However, when I switch to one of my "real" workspaces I notice that the "workspace" workspace is not listed as an option to be switched to.

As would be expected, reinstalling eclipse resolves the issue. But it would be nicer to find a way to fix the problem without resorting to that.


I'd recommend you to create a shortcut to eclipse.exe with the -data command line option. This way you can create a separate shortcut to each workspace you use, and avoid unnecessary dialogs and mouse clicks.

Windows: Just create an Eclipse shortcut on your desktop, then right-click to open Properties and under Shortcut set something like this as Target: C:\eclipse\eclipse.exe -data C:\Path\to\your\workspace1. This will launch Eclipse and automatically open workspace1.

Repeat the steps for all the workspaces you use often.


Editing the config.ini file with

osgi.instance.area.default=\D:\\Projects\\Eclipse Workspace\\

worked for me.


I followed the thread and tired all things but didn't work. Finally I saw that my eclipse shortcut target is like below

C:\Eclipse_3.6\eclipse\eclipse.exe -clean -data "C:\workplace" ...

I simply removed -data option and it worked. Now I got popup to choose workspace at startup.

cheers.


I use Eclipse Indigo, and this is how I do it:

Window > Preferences > Startup and Shutdown > Workspaces

check box at the top of the window: "Prompt for workspace on startup"


Aptana 3.2.2

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

Edit:

RECENT_WORKSPACES=I\:\\PDT\\workspace

It will check the recent workspace, so just set it to what you want, I do it for running off external drive.


Inside the configuration/.settings folder of your Eclipse installation, there is a file called org.eclipse.ui.ide.prefs. Open this file in a text editor and change the property SHOW_WORKSPACE_SELECTION_DIALOG from false to true.

Tested with Eclipse 3.7 on Windows.


Sometimes you need to pay attention to howw Eclipse is launched. I ever pinned Eclipse by rigk-click on the excutable and pinning it to taskbar. In this way, the Eclipse is launched to use settings under c:\User\public\public Documents\eclipse" which is not very desirable.

However, if you pin it by creating a short-cut, then it will launch to use settings in the folder of Eclipse installation. Then everything makes much more sense.


if your eclipse is auto-closing at startup you may do this: open the properties of your shortcut and add -clean at the end of the path. or do this in cmd : cd C:\PATH_TO_YOUR_ECLIPSE\eclipse -clean like mentioned earlier above comments


I first tried the -clean option, but that didn't solve the problem.

Then I added the -data option with the correct path to the workspace.

That solved the problem for me.


Starting eclipse with eclipse -clean did wonders for me.


I had the same issue (in Eclipse Juno), but I just wanted to change the default workspace to the one I'm using. There is a setting in:

ECLIPSE_DIRECTORY/configuration/config.ini

that is causing a specific workspace to be loaded without prompting for a workspace. If you just want to change the default workspace, you can just modify the value or add it if it doesn't exist:

[email protected]/some_workspace

or

osgi.instance.area.default=/some/absolute/path/some_workspace


Version: Ecliplse CIndigo Service Release 2

  1. File > Switch Workspace > Other...
  2. In the textbox, write the path in the Workspace or Browse

It automatically sets the default Workspace during exit. To change Workspace go back to step 1.


I had the same problem on my eclipse, and calling eclipse -clean did not solve the problem.

In the end I figured out that within the installation folder of eclipse there is a script called eclipse. This script does some setting of environment variables and then calls eclipse.bin. The call for eclipse.bin contained the command line switch

-data ~/.eclipse

When I removed that switch from start-up script, I got the workspace selection as expected. Maybe that helps others to solve their problems.


I resolved the problem by adding -showLocation parameter to eclipse.ini


The “Prompt for workspace at startup” checkbox did not working. You can setting default workspace, Look for the folder named “configuration” in the Eclipse installation directory, and open up the “config.ini” file. You’ll edit the "osgi.instance.area.default" to supply your desired default workspace.


Go to Window -- Preferances - General -- Startup and Shutdown -Workspaces

Check box for Prompt for workspace on startup is there . Select it.

Then at start up eclipse will ask for workspace selection.

---- EDIT ----

On OSX the Eclipse(Juno) menu bar path is:

Eclipse - Preferences

In the preferences dialog box, I selected the tree node:

 General - Startup and Shutdown - Workspaces

From that panel, there was a check box labeled

**Prompt for workspace on startup** 

I checked it, then shut down eclipse and restarted it. It prompted me for a new workspace location.


Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to eclipse-cdt

Eclipse CDT project built but "Launch Failed. Binary Not Found" Eclipse CDT: no rule to make target all How to see my Eclipse version? Eclipse C++: Symbol 'std' could not be resolved Eclipse CDT: Symbol 'cout' could not be resolved C++ Error 'nullptr was not declared in this scope' in Eclipse IDE "Unresolved inclusion" error with Eclipse CDT for C standard library headers How to enable C++11/C++0x support in Eclipse CDT? How to force Eclipse to ask for default workspace? The program can't start because cygwin1.dll is missing... in Eclipse CDT

Examples related to workspace

Jenkins Pipeline Wipe Out Workspace How to change workspace and build record Root Directory on Jenkins? Eclipse Workspaces: What for and why? The cause of "bad magic number" error when loading a workspace and how to avoid it? Clean out Eclipse workspace metadata Eclipse: Error ".. overlaps the location of another project.." when trying to create new project Eclipse - "Workspace in use or cannot be created, chose a different one." Create a new workspace in Eclipse How to force Eclipse to ask for default workspace? Disable building workspace process in Eclipse