Eclipse打开空白工作区 [英] Eclipse opens blank workspace
问题描述
我有这个奇怪的问题,发生以下情况:
I have this weird issue where the following happens:
- 新鲜eclipse juno安装(应用所有更新)
- 工作正常,询问我要打开的工作区,启动时出现一个对话框
- 几天后,停止提示我的工作区,打开空白的工作区而不是/ Users / myself / Documents
如果我选中preferences - > workspace - > startup and shutdown列表中的唯一工作区是我创建的工作区,并且不提示工作区的复选框是未选中。
If I check "preferences -> workspace -> startup and shutdown" everything seems fine, the only workspace in the list is the one I created and the checkbox that says "don't prompt for workspace" is not checked.
发生了几次已经在新鲜的eclipse安装和新鲜的硬盘驱动器(同一台机器,但我更换硬盘,重新安装操作系统和一切,其他原因,现在再次发生)。
This happened a few times already on fresh eclipse installations and fresh hard drives (same machine but I replaced the hard drive, re-installed OS and everything for other reasons and now it happened again).
我在:
- OSX 10.7.5
- Eclipse Juno(服务版本2)
任何帮助赞赏!
推荐答案
我在OSX上有完全相同的问题,没有理由,一个美好的一天,Eclipse将开始 - 一个新的空白工作区!
I have exactly the same problem on OSX, for no reason, one fine day, Eclipse will start-up with a new blank workspace!
所有愚蠢的答案和答复者在那里:是我知道如何设置和选择一个默认的工作区!而且,NO不会创建一个新的工作区,重新导入大量项目,并且丢失了我Toad Extension下的所有30多个数据库连接。不可选。
And to all the stupid answers and responders out there: YES I know how to set and select a default workspace! And NO creating a new workspace, re-importing lots of projects and loosing all my 30+ database connections under my Toad Extension, is not an option.
我发现
- 由于某种原因,Eclipse创建一个目录
/ Users / user_name / Documents / workspace
它是启动的空白工作区(不正确) - 我的平常工作区位于
/ Users / user_name / Documents / Development / eclipse
- For some reason Eclipse creates a directory
/Users/user_name/Documents/workspace
which is the blank workspace it starts-up with (incorrectly) - My usual workspace is under
/Users/user_name/Documents/Development/eclipse
解决方案是(这是在Mac OSX上,不知道在Windows上是否相同): / p>
The solution is (this is on Mac OSX, don't know if it is the same on Windows):
- 转到Eclipse运行Eclipse的Eclipse目录(我的是
/ Applications / eclipse
) - 在
{eclipse_dir} / configuration
中打开文件config.ini
- 找到
osgi.instance.area.default=@user.home /...
的行,并确认它指向伪造的工作空间目录。 - 修改此en的路径尝试指向正确的工作区
- 保存
config.ini
文件。 - 尝试启动Eclipse,它现在应该打开你的工作区。
- 如果你的Eclipse现在停止加载插件,转到你的工作区目录,然后查找
.metadata
目录(其隐藏)。在.metadata
目录中,删除.mylyn
目录并重新启动Eclipse。
<一旦Eclipse开始使用正确的工作区,请执行适当的Eclipse关闭,以确保您的工作区已关闭并正确保存。
- Goto your Eclipse directory where you run Eclipse from (mine is
/Applications/eclipse
) - In
{eclipse_dir}/configuration
open the fileconfig.ini
- Find the line
osgi.instance.area.default=@user.home/...
and confirm that it is pointing to the bogus workspace directory. - Modify the path of this entry to point to the correct workspace
- Save the
config.ini
file. - Try starting Eclipse and it should open your workspace now.
- If your Eclipse get stuck loading plugins now, goto your workspace directory and look for the
.metadata
directory (its hidden). Inside the.metadata
directory, remove the.mylyn
directory and restart Eclipse. - Once Eclipse started with the correct workspace loaded, do a proper Eclipse shutdown to ensure your workspace is closed and saved properly.
为Eclipse Juno工作。
This worked for Eclipse Juno.
希望这有帮助!
这篇关于Eclipse打开空白工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!