Eclipse Error: Workspace In Use Or Cannot Be Created, Choose A Different One
- by Joe Jr Yamut
Ever encountered an error like this one where Eclipse will not proceed to start until you choose or create another workspace? But you are sure you already have the correct workspace set in your home directory somewhere and it is writable.
Well I did. But the issue came up only because I copied the workspace from another user (from my other Linux account), and also copied the Eclipse installation (I did not install from the Ubuntu Software Center or by apt-get).
There are a number of ways to get around this issue. If you search on Google, many of the suggestions will fall under the following:
1) Delete the .lock file which resides in the .metadata directory of the Eclipse workspace. Some would also suggest to delete the .log files also found on that same directory. Others would even go as far as suggesting to temporarily relocate the contents of the .metadata directory then move it back in once Eclipse is already running.
2) Kill or stop all running instances of Eclipse, and at the same time, kill all running instances of java related to Eclipse.
3) Assign another workspace, then just copy all your projects to the new workspace.
4) Make sure all of the project directories and the workspace is readable (to your user).
Well, I did #1, #2, and #4 of the above and was still getting the “Workspace In Use Or Cannot Be Created, Choose A Different One” error. #3 could have been an easy way out, but I did not want to do that, and (this is the obvious clue) Eclipse file chooser was still pointing to my other user account when it opened.
The fix for me was something else, and I knew that there was a configuration file somewhere that Eclipse is using, because Eclipse was still pointing to the old workspace location. The solution is by going into the configuration > .settings > org.eclipse.ui.ide.prefs file and then edit the RECENT_WORKSPACES value to the correct one. Problem solved!
It will look something like this inside:
MAX_RECENT_WORKSPACES=5
RECENT_WORKSPACES= path_to_workspace_here
RECENT_WORKSPACES_PROTOCOL=3
SHOW_WORKSPACE_SELECTION_DIALOG=false
eclipse.preferences.version=1
Since I copied the Eclipse installation from another user account, the preferences were also carried over and thus the error, because it could not read inside the other user’s home directory.
If you are fond of using multiple users or have to use a different OS for specific projects like me (I sometimes have to work on Windows for some specific projects), then maybe it is a good idea to put your Eclipse workspace in a place where it is readable by all your users, and accessible to all OS you are using on your machine.
Similar Posts:
- > Running on PHP-FPM May 19, 2020
- > “PROGRAM_NAME” Is Not Recognized As An Internal Or External Command, Operable Program Or Batch File December 20, 2013
- > password-less ssh logins June 8, 2007
- > Avoiding Errors When Setting Up Webistrano February 4, 2012
- > Eclipse IDE Global Menu Hack On Ubuntu October 2, 2012
Ever encountered an error like this one where Eclipse will not proceed to start until you choose or create another workspace? But you are sure you already have the correct workspace set in your home directory somewhere and it is writable. Well I did. But the issue came up only because I copied the workspace…