尝试在 Eclipse 中保存工作台状态时出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4939721/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Problems occurred while trying to save the state of the workbench in Eclipse
提问by Dimosthenis Kontogiorgos
I have a problem each time I close Eclipse (Helios Release 1 in Windows Vista). This is the error log:
每次关闭 Eclipse(Windows Vista 中的 Helios Release 1)时都会遇到问题。这是错误日志:
Problems occurred while trying to save the state of the workbench. Problems occurred during save. Problems while saving variables and containers C:\Users...(workspace dir)....metadata.plugins\org.eclipse.jdt.core\variablesAndContainers.dat (Access Denied)
尝试保存工作台状态时出现问题。保存时出现问题。保存变量和容器时出现问题 C:\Users...(workspace dir)....metadata.plugins\org.eclipse.jdt.core\variablesAndContainers.dat(拒绝访问)
When I started using Eclipse I used to have the workspace in different directory. Then I moved it to a different location. On loading the workspace it works correct.
当我开始使用 Eclipse 时,我曾经将工作区放在不同的目录中。然后我把它移到了不同的位置。在加载工作区时,它工作正常。
Any ideas how to fix it?
任何想法如何解决它?
回答by Jabrown207
To fix go to your workspace and delete the .metadata folder. Restart eclipse and point it to where the old workspace was and load projects using File -> New.
要修复,请转到您的工作区并删除 .metadata 文件夹。重新启动 eclipse 并将其指向旧工作区所在的位置,然后使用 File -> New 加载项目。
You can only load one by one but at least it solved the issues
你只能一一加载,但至少它解决了问题
回答by Dimosthenis Kontogiorgos
It seems like the problems is now solved. I managed to do that in an unorthodox (in my opinion) way. It seemed that there was an access problem. Eclipse didn't have access to its own .dat files. Probably because of some windows-eclipse misunderstanding. I tried to delete the files that were making an error and Eclipse created them again. Like that, problem was solved.
现在问题似乎已经解决了。我设法以一种非正统(在我看来)的方式做到了这一点。似乎存在访问问题。Eclipse 无法访问它自己的 .dat 文件。可能是因为一些 windows-eclipse 的误解。我试图删除出错的文件,Eclipse 再次创建了它们。就这样,问题就解决了。
回答by Udo Junghans
Best way is looking into WORKSPACE/.metadata/.log where Eclipse spits out all everything what's wrong. Maybe there is just one small file to kill or unlock. So you don't need to import all former projects from scratch
最好的方法是查看 WORKSPACE/.metadata/.log,其中 Eclipse 会吐出所有问题。也许只有一个小文件需要杀死或解锁。所以你不需要从头开始导入所有以前的项目
回答by Sam
I fixed it by going into:
我通过进入修复它:
workspace\.metadata\.plugins\org.eclipse.jdt.core\.org.eclipse.jdt.core.external.folders
I unhid the .project file and granted permission to the file for system, admins etc.
我取消隐藏 .project 文件并授予系统、管理员等文件的权限。
My problem was solved
我的问题解决了
回答by Nino Matos
I'm not sure if the problem is the same but in my case was the Controlled folder access in the windows defender that was the source of my error.
我不确定问题是否相同,但在我的情况下,Windows Defender 中的受控文件夹访问是我错误的根源。
I turned off in the Virus @ Thread protection settings and restarted eclipse and was OK.
我在 Virus @ Thread 保护设置中关闭并重新启动了 eclipse 并且一切正常。