A “Workspace at … in use or cannot be created, choose a different one” Error in Java IDEs
I program in Java using many IDEs: Eclipse SD, Eclipse EE, NetBeans, STS. However, I have some problems with locking my workspaces. I see “Workspace at … in use or cannot be created, choose a different one” error. It appears after crashing my IDE and is really annoying because I’m forced to change another directory for my workspace.
This error is starting when you wish to run more instances of your IDE on computer. It can be only one process on one workstation at a time. So when your IDE crashes or something else close your program abnormally, the .lock file isn’t removed. And consequently, you can’t run your crashed IDE another time. Your application is simply locked. We should look for .lock file. So we should start the command on the console:
# find / -iname .lock
find: ‘/var/run/user/1000/gvfs’: Brak dostępu
find: ‘/run/user/1000/gvfs’: Brak dostępu
Wow, you see that there are a few such files that forced me to change the directories of my workspaces. We are specially interested in the .lock files that are included in the .metadata directories. We have four such files. Delete them to enable your IDE start again without changing the workspace directories.