Pages

Tuesday, February 20, 2018

Eclipse: “Workspace in use or cannot be created, chose a different one.” How to unlock a workspace?

Eclipse: “Workspace in use or cannot be created, chose a different one.” How to unlock a workspace?

Sometime when opening Eclipse IDE, you may get the error – “Workspace in use or cannot be created, chose a different one.”. This generally happens if previous Eclipse process didn’t quit gracefully and thus failed to delete the .lock file in the workspace directory. .lock file is there to ensure that there is only one instance of Eclipse working in a particular workspace. Fixing this is very simple – just delete the .lock file in the .metadata directory in your Eclipse workspace directory and restart Eclipse.
Shell command:

[shell]

rm <path to Eclipse workspace>/.metadata/.lock
[/shell]

Caution – Don’t delete the .metadata folder. If you delete the .metadata folder all your Eclipse preferences will be deleted.

No comments:

Post a Comment