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
.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:
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:
- in .metadata/, rm .lock file
- if 1) doesn't work, try end process javaw.exe etc. to exit the ide
- if 1)&2) doesn't work, try rm .log file in .metadata/, and double check .plugin/.
- 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
- Eclipse says: “Workspace in use or cannot be created, chose a different one.” How do I unlock a workspace?
- Eclipse - "Workspace in use or cannot be created, chose a different one."
- Eclipse - “Workspace in use or cannot be created, chose a different one.” even after I removed .lock
- How to use classes of a package in another package which is in a project created at a different eclipse workspace
- how to use eclipse workspace on different computers
- Open external files with eclipse ---> Error: "The default workspace is in use or cannot be created"
- Cannot install 2 Android apps on my device: the one is copy of the other but use different database
- Some projects cannot be imported because they already exist in the workspace error in Eclipse
- how do I get eclipse to use a different compiler version for Java?
- Point eclipse IDE to use another JRE / JDK other than one specified in JAVA_HOME
- How to use different line wrapping for strings and other items in Eclipse for Java
- How do i configure eclipse to make use of different version of JDK
- how to use appcfg.py for google-app-engine projects created using google's eclipse plugin?
- Cannot create Eclipse workspace
- "R cannot be resolved to a variable" after transferring Eclipse workspace from pc to mac
- Eclipse - Cannot complete the install because one or more required items could not be found (org.apache.httpcomponents.httpclient)
- How would one use IDecorationContext api from Eclipse JFace
- why I cannot use "run Android lint" from menu "Window" in Eclipse in toolbar I can run it, is it OK?
- How can I copy Eclipse classpath variables from one workspace to a new workspace?
- Cannot properly deploy WAR file created by Eclipse to Tomcat
- Can Eclipse and IntelliJ IDEA use the same workspace without conflict?
- How to use an existing Project as a template for a new one with Eclipse (CDT)?
- How to make Maven use Eclipse workspace default JRE?
- In eclipse is there a way to run more than one Java app in different console windows?
- Eclipse CDT created makefile cannot "clean" on Windows
- Use same workspace for multiple eclipse instances at same time
- eclipse sts cannot start tomcat: ports already in use
- Disable the building of one project in an Eclipse workspace
- How to use SVN and Eclipse in workspace together?
- Photran says "At least one configuration should be available. Project cannot be created." when creating a fortran project in eclipse
More Query from same tag
- Maven local repository not working
- How do I determine the command string eclipse uses to launch my java program?
- Eclipse crashes in particuar (weird) moments
- Is there any plugin or feature that determines which JARs are unused in an application or a project (in a given project life cycle)
- android listview with real-time sensor updates
- Using CUTE for C++ tests in Eclipse
- Missing tools-1.6.jar with Eclipse and Maven
- Don't show anything on Graphical Layout Tab
- Override port number specified in VM args for OSGi
- How to edit build path entries in Eclipse?
- Database for dummies
- Implement RESTful service in Java EE using J2EE Preview runtime in Eclipse
- What is the eclipse java declaration shortcut?
- git(hub) lost all my changes in group project
- Eclipse Juno Tomcat 6 Remote Host Not Supported
- C Enum reference undefined, yet sitting in a included header file?
- make Eclipse equals() / hashCode() use getters
- Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
- Struts Spring & Hibernate integration in Online Examination
- Getting highscore for snake game from .txt file
- Can OSGi subsystems replace Eclipse features?
- Clear eclipse configuration after each test case file runs in SWTBot testing
- Are there other trusted download sources for Eclipse Ganymede 3.4.2? It's no longer available on eclipse.org!
- How to script the "Convert to AspectJ" action when creating a new Eclipse project?
- onClickListener cannot be resolved to a type and not applicable
- the working order of codes at Eclipse IDE
- Adapter in android in list view
- Button starts a new activity if it is pressed for 5 seconds
- Tomcat7 (localhost:8080): 404 error
- JUnit Eclipse - Display stack trace on success