Eclipse 工作区因关闭不当而损坏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17336606/
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
Eclipse Workspace Corrupted due to improper shutdown
提问by JREN
I'm working with Eclipse juno on windows7-64bit OS. Due to sudden power problem my system got shutdown, when i restart the Eclipse next start, Eclipse fails to load the workspace. It freezes on startup, or the workspace does not show up. It seems the workspace gets corrupted every time Eclipse is not shut down properly.
我正在 windows7-64 位操作系统上使用 Eclipse juno。由于突然的电源问题,我的系统关闭了,当我下次启动 Eclipse 时,Eclipse 无法加载工作区。它在启动时冻结,或者工作区不显示。每次 Eclipse 未正确关闭时,工作区似乎都会损坏。
One way to fix the startup is
修复启动的一种方法是
rm -rf ~/workspace/.metadata
rm -rf ~/workspace/.metadata
After doing this, of course, settings are gone, projects have to be reimported etc. - It's really a pain :( and I don't understand why it has to be this way. Other applications seem to be able to keep their data intact, even if they are killed.
这样做之后,当然,设置消失了,必须重新导入项目等。 - 这真的很痛苦:(我不明白为什么必须这样。其他应用程序似乎能够保持其数据完整无缺,即使他们被杀了。
Can you suggest ways to remedy this problem? Are there ways of recovering a corrupted workspace including the settings?
你能提出解决这个问题的方法吗?有没有办法恢复损坏的工作区,包括设置?
thanks in advance
提前致谢
回答by JREN
You can edit your shortcut to eclipse and add behind the line -clean as runtime parameter. It should clean your workspace and it might fix your corruption.
您可以编辑 eclipse 的快捷方式并在 -clean 行后面添加作为运行时参数。它应该清理你的工作区,它可能会修复你的损坏。
So your shortcut would be something like:
所以你的快捷方式是这样的:
"C:\Program Files(x86)\Eclipse\eclipse.exe" -clean
"C:\Program Files(x86)\Eclipse\eclipse.exe" -clean
EDIT: Make sure once you've used this to remove it again after, you don't want to clean your eclipse every time you start it.
编辑:确保一旦您使用它再次将其删除,您就不想在每次启动它时清理您的日食。
回答by user4416220
from Vissol.ca
来自 Vissol.ca
- create a new workspace
- import new (android) project(s) from existing source(s)
- good to go...
- 创建一个新的工作区
- 从现有源导入新的(android)项目
- 好去...
then you can backup original workspace , delete it and recreate it if desired.
然后您可以备份原始工作区,删除它并根据需要重新创建它。