Eclipse 在启动时冻结 - 在加载工作区之前
早上的第一件事是,在我打开 PC (Windows XP) 并启动 Eclipse 后,它只是显示启动屏幕,然后就冻结了。大约 20 分钟后,它会询问我要加载哪个工作区。
Eclipse 3.5 和 3.6 中出现该问题。在 3.6 Eclipse 安装中,我只有标准 PDE 安装 + Google 插件(用于 GWT 开发)+ Subclipse。
因为我已将其配置为询问我工作区,所以我可以看到它与工作区或项目无关。
我怀疑谷歌插件,因为我在安装这个插件之前没有遇到任何问题,但我已经搜索过,没有遇到任何人报告类似的问题。
它只会执行一次 - 在我早上打开机器后立即执行。此后,它会正常启动 - 通常在几秒钟内。
它可能在做什么?我怎样才能知道它在做什么?
First thing on a morning, just after I switch on my PC (Windows XP) and start my Eclipse it simply shows the splash screen and then freezes. After about 20 minutes it will then ask me which workspace to load.
The problem was happening with 3.5 and 3.6 Eclipse. With the 3.6 Eclipse installation I only have the standard PDE install + Google plugin (for GWT development) + Subclipse.
Because I have it configured to ask me for the workspace I can see its not workspace or project related.
I suspect the Google plugin as I have not had any problems before installing this but I have searched and have not come across anybody reporting similar problems.
It only does this once - straight after I switch my machine on in the morning. After this it starts fine - typically in a few seconds.
What is it likely to be doing? How can I find out what it is doing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
发现我的问题了。 Google GWT 插件不会自行清理,并会在 Temp 文件夹中留下大量文件(在 XP 上为 C:\Documents and Settings{用户名}\Local Settings\Temp)。我这里有超过 100000 个文件和数千个文件夹 - 其中超过 99% 是由于 Google GWT 插件造成的。我删除了这些,现在 Eclipse 在几秒钟内启动,而不是 20 分钟。而且我的整台机器总体运行得更流畅。
Found my problem. The Google GWT plugin does not clean up after itself and leaves lots of files in the Temp folder (C:\Documents and Settings{username}\Local Settings\Temp on XP). I had over 100000 files and several thousand folders in here - with over 99% of them due to the Google GWT plugin. I removed these and now Eclipse starts in a few seconds instead of 20 minutes. Plus my whole machine is generally running more smoothly.
尝试使用 -console 和 -consoleLog 标志重新启动 eclipse。当您可以与 OSGi 交互并查看平台输出时,这将打开一个控制台窗口。您可以将这些标志放入 eclipse 文件夹(eclipse.exe 所在位置)的 eclipse.ini 中。在控制台窗口中,输入“ss”,这将显示加载和启动的插件。这可能会向您指出缓慢的原因。您可以键入 start 和 stop 来启动和停止 OSGi 包。另外,请确保 eclipse.ini 中没有“-clean”,因为它会导致所有插件重新加载,这可能会导致速度变慢。
Try restarting eclipse with the -console and -consoleLog flags. This will open a console window when you can interact with OSGi and see platform output. You can put those flags in the eclipse.ini in your eclipse folder (where eclipse.exe is located). In the console window, type "ss" which will display what plug-ins are loaded and started. That could point you to the reason for the slowness. You can type start and stop to start and stop OSGi bundles. Also, make sure that there is no "-clean" in your eclipse.ini as it will cause all plugins to be reloaded and that may cause some slowness.
我已经通过直接下载和软件中心安装了 Eclipse,但在 ubuntu 12.04 LTS 上,它们似乎都挂在启动屏幕上,除非删除 ~/workspace 目录。
我发现通过单击启动屏幕然后按 Enter 键,即使不删除 ~/workspace 目录,它也可以完美启动!
I have installed Eclipse through direct download as well as Software Centre but on ubuntu 12.04 LTS they both seem to hang on splash screen unless the ~/workspace directory is deleted.
I found that by clicking on the splash screen and then pressing Enter it launches perfectly fine even without removing the ~/workspace directory!!
虽然 @CharlesB 可能对我来说对大多数人都有效,但它并不适用,因为 Eclipse 通常会破坏单个项目(通常是最后一个项目)。因此,我发现对于链接的项目,删除我认为是最后一个项目或整个文件夹的
.snap
和.history
可以更好地工作:然后重新启动 eclipse,您将看到
LAST_PROJ_BEFORE_ECLIPSE_CRASHED
已关闭。将其删除,因为您将无法打开现有项目并将其重新导入到工作区(链接的项目仍将具有.project
)。While @CharlesB probably works for most people for me it doesn't as Eclipse generally corrupts an individual project (generally the last project). Thus I find for linked projects deleting the
.snap
and.history
of what I think is the last project or the entire folder to work better:Then restart eclipse and you will see
LAST_PROJ_BEFORE_ECLIPSE_CRASHED
as closed. Delete it because you won't be able to open and reimport existing project into the workspace (your linked project will still have the.project
).就我而言,在选择工作区后加载“view.ui”时,它在启动屏幕中冻结。
修复方法是运行它:
eclipse-clean-clearPersistedState
In my case it was freezing in the splash screen, while loading 'view.ui', after having selected the workspace.
The fix was running it with:
eclipse -clean -clearPersistedState
删除本地工作区中的 .metadata 文件夹(这对我有用)。它似乎包含一个 .LOCK 文件,如果未正确关闭该文件,则会阻止 Eclipse 正常启动。
这是完美的工作。
Delete the .metadata folder in your local workspace (this is what worked for me). It seems that it contains a .LOCK file that if not properly closed, prevents eclipse from starting properly.
This is Perfectly working.
对我来说,下面是修复
在 eclipse.ini 中,确保它指向具有正确 jvm.dll 虚拟机条目的 java8。
For me below was fix
In eclipse.ini, make sure it is pointing to java8 with correct jvm.dll vm entry.
可以使用显式 tempdir 规范来启动 DevMode JVM。我们使用 Ant 启动 DevMode,并且我指定了以下 JVM 参数:
如果也通过 Google Eclipse 插件启动,则应该能够使用相同的“-D”参数。
作为构建过程的一部分,我们使用的临时目录会定期清理,因此垃圾文件的积累得到控制。
One can launch the DevMode JVM with an explicit tempdir specification. We use Ant to launch DevMode, and I have the following JVM arg specified:
One should be able to use the same "-D" arg if launching via the Google Eclipse plugin as well.
The tempdir we use is cleaned regularly as part of our build process, so junk file accumulation is controlled.
对我来说,删除 .snap 文件并重命名和恢复 org.eclipse.core.resources 没有帮助。我必须删除 org.eclipse.core.resources 文件夹中的 .history 目录。
之后我就可以开始我的日食了。
For me deleting .snap files and renaming and restoring of org.eclipse.core.resources did not help. I had to delete .history directory inside org.eclipse.core.resources folder.
After this I was able to start my eclipse.
我在 Luna4.4.2 上也遇到了类似的问题。但这是我第一次打开这个 Eclipse 版本,所以之前没有使用过任何项目,因此以上都不是我的解决方案。我等了大约 20 分钟,没有点击冻结的启动屏幕。幸运的是,“选择工作空间”屏幕终于弹出了,Eclipse 现在工作正常了。
I had a similar problem with Luna4.4.2. But it was my first time opening this Eclipse version, so there were no projects used before hence none of the above was a solution for me. I waited ~20 minutes without clicking on the frozen splash screen. Luckily "Choose Workspace" screen finally popped up, and Eclipse works fine now.
对于 Linux 用户。在我清理 Eclipse 缓存后,我的启动冻结停止了。当 Eclipse 未运行时,我执行了以下操作:
目录Eclipse 启动时间恢复到合理的 5-10 秒。
For Linux users. My startup freezes stopped after I did Eclipse cache cleanup. When Eclipse was not running I did the following:
After that Eclipse startup time went back to reasonable 5-10 sec.
通常会帮助使用不同的 Eclipse 版本打开工作区,然后关闭它并使用当前版本打开。
Very often helps open workspace with different eclipse version, then close it and open with current version.
@CharlesB 发布的链接引导我走向正确的方向,但我发现您只需要删除位于此处的
.snap
文件:[Workspace Directory]/.metadata/.plugins/org .eclipse.core.resources/.snap
(请注意,
.metadata
目录是隐藏的。)The link @CharlesB posted led me in the right direction, but I found that you only need to delete the
.snap
file located here:[Workspace Directory]/.metadata/.plugins/org.eclipse.core.resources/.snap
(Note the
.metadata
directory is hidden.)也许这篇博文可以帮助:
Maybe this blog post could help:
我也有类似的问题。 Eclipse (Luna) 正常启动并出现闪屏,然后打开主窗口并立即冻结。对我来说运行 eclipse
解决了这个问题。
I also had similar problem. Eclipse (Luna) started normally with splash screen, then opened main window and immediately freeze. For me running eclipse with
fixed the problem.