Accepted answer

right answer can be found in this (duplicate) question.

i reproduced the answer here (and it works!):

just delete the .lock file in the .metadata directory in your eclipse workspace directory


go to taskmanager(right click in the task bar) and select processess menu bar and select eclipse.exe and click endprocess


in my case this occurred on a test instance of eclipse run from my main eclipse session during plugin development. an error caused the gui to disappear, but didn't totally kill it. hitting the stop button in the console took care of it.


check that you have enough rights to workspace directory. i got this error when i didn't have write permission to workspace.


an additional reason could be that you're pointing to a workspace on a drive that no longer exists, thinking that you're choosing the valid one. for instance, for me the workspace used to exist on the f drive, but now it is on my d drive. even though i don't have the f drive anymore it is still listed as a workspace i once used during eclipse startup. when i choose this old workspace eclipse complains that the workspace is "in use", which is very strange.


running eclipse in administrator mode fixed it for me. you can do this by [right click] -> run as administrator on the eclipse.exe from your install dir.

i was on a working environment with win7 machine having restrictive permission. i also did remove the .lock and .log files but that did not help. it can be a combination of all as well that made it work.


workspaces can only be open in one copy of eclipse at once. further, you took away your own write access from the looks of it. all the users in question have to have the 'admin' group for what you did to even work a little.


for windows users: in case of you can't remove .lock file and it gives you the following:

enter image description here

and you know that eclipse is already closed, just open task manager then processes then end precess for all eclipse.exe occurrences in the processes list.


sometimes deleting the .lock file does not work. you can try this:

remove recent_workspaces line from eclipse/configuration/.settings/org.eclipse.ui.ide.prefs


i've seen 3 other fixes so far:

  1. in .metadata/, rm .lock file
  2. if 1) doesn't work, try end process javaw.exe etc. to exit the ide
  3. if 1)&2) doesn't work, try rm .log file in .metadata/, and double check .plugin/.
  4. this always worked for me: relocate .metadata/, open and close eclipse, then overwrite .metadata back

the solution boils down to clean up the .metadata folder with correct contents

Related Query

More Query from same tag