当我启动时,Eclipse显示“工作区不能被锁定”
“无法启动产品,因为相关的工作空间目前正在被另一个Eclipse应用程序使用”或“工作空间正在使用或无法创建,请选择另一个工作空间。”
但我知道它不是。
我如何“解锁”它?
当我启动时,Eclipse显示“工作区不能被锁定”
“无法启动产品,因为相关的工作空间目前正在被另一个Eclipse应用程序使用”或“工作空间正在使用或无法创建,请选择另一个工作空间。”
但我知道它不是。
我如何“解锁”它?
当前回答
还有另一种情况,工作空间的路径可能不存在,例如,如果您从另一个工作空间导入了首选项,那么一些导入的工作空间地址可能会出现在您的“开放工作空间”对话框中;然后,如果您不注意这些地址,一旦您试图打开它们,就会得到完全相同的错误。
其他回答
如果没有工作,另一种可能的情况是看到有一个正在运行的Java应用程序。可能是您以前的打开和关闭留下了未杀死的Java实例。
如果有两个java实例,请检查是否有正在运行的java实例,至少需要杀死一个。但是,大多数时候我杀死任何java运行:),因为java使用的工作空间更早,如果不杀死它仍然会。 如果您想要多个IDE用于不同或相同的项目,请更改另一个工作空间,但您应该在打开IDE后导入项目窗体工作空间。
下面是解决这个问题的几个步骤。4步对我来说很有用。
Delete .log files along .metadata folder. Check the current user permission make sure to check the full control checkbox click apply then OK. If you run system drive defragmentation or maintenance before you run eclipse editor sometimes original file path are not in their respective path to make sure run "previous version" time before your system maintenance of your drive where the eclipse workbench or something similar to this was saved. This last option is works for me. Check the drive letter of your current drive where the code editor was saved. If something unusual e.g before your maintenance your drive letter is K then after defragment or maintenance. The drive letter is now L hence you should change the drive letter to its original one that is K. to do this click the ff: Open control panel System & security Administrative tools Computer management Disk management in disk mngt choose the Drive example L then right click > change drive letter & path > click remove > then ok, open it again then > click add and > choose your original drive letter for that drive then click ok. If you use your computer for a long period of time do restart first to refresh everything.
我也遇到了同样的问题,但是由于某些原因,工作区中的.lock文件没有被删除。甚至创建一个新的工作空间也会被锁定。
所以我所做的就是清理windows temp文件夹,%PREFETCH%文件夹和% temp %位置。重新启动系统,然后允许删除.lock文件。
也许它会帮助别人。
当您没有正确关闭eclipse.exe时,就会发生这种情况。
*打开任务管理器->结束任务你的eclipse->现在打开eclipse.exe它将工作。
希望它能帮助到别人。
还有另一种情况,工作空间的路径可能不存在,例如,如果您从另一个工作空间导入了首选项,那么一些导入的工作空间地址可能会出现在您的“开放工作空间”对话框中;然后,如果您不注意这些地址,一旦您试图打开它们,就会得到完全相同的错误。