Eclipse 在启动时冻结 - 在加载工作区之前
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3657054/
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 freezing at startup - before loading workspace
提问by pillingworth
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.
早上的第一件事,就在我打开我的 PC (Windows XP) 并启动我的 Eclipse 之后,它只是显示启动画面,然后冻结。大约 20 分钟后,它会询问我要加载哪个工作区。
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.
问题发生在 3.5 和 3.6 Eclipse 上。在 3.6 Eclipse 安装中,我只有标准的 PDE 安装 + Google 插件(用于 GWT 开发)+ 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.
我怀疑是 Google 插件,因为在安装之前我没有遇到任何问题,但我已经搜索过,但没有遇到任何报告类似问题的人。
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?
它可能在做什么?我怎样才能知道它在做什么?
采纳答案by pillingworth
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.
发现我的问题。Google GWT 插件不会自行清理并在 Temp 文件夹(XP 上为 C:\Documents and Settings{username}\Local Settings\Temp)中留下大量文件。我这里有超过 100000 个文件和数千个文件夹 - 其中超过 99% 是由于 Google GWT 插件。我删除了这些,现在 Eclipse 会在几秒钟而不是 20 分钟内启动。加上我的整机运行起来一般都比较流畅。
回答by marcelebrate
The link @CharlesB posted led me in the right direction, but I found that you only need to delete the .snap
file located here:
@CharlesB 发布的链接使我朝着正确的方向前进,但我发现您只需要删除.snap
位于此处的文件:
[Workspace Directory]/.metadata/.plugins/org.eclipse.core.resources/.snap
[Workspace Directory]/.metadata/.plugins/org.eclipse.core.resources/.snap
(Note the .metadata
directory is hidden.)
(注意.metadata
目录是隐藏的。)
回答by CharlesB
Maybe this blog postcould help:
也许这篇博文可以帮助:
In your workspace directory perform the following steps:
- cd .metadata/.plugins
- mv org.eclipse.core.resources org.eclipse.core.resources.bak
- Start eclipse. (It should show an error message or an empty workspace because no project is found.)
- Close all open editors tabs.
- Exit eclipse.
rm -rf org.eclipse.core.resources
(Delete the newly created directory.)mv org.eclipse.core.resources.bak/ org.eclipse.core.resources
(Restore the original directory.)- Start eclipse and start working. :-)
在您的工作区目录中执行以下步骤:
- cd .metadata/.plugins
- mv org.eclipse.core.resources org.eclipse.core.resources.bak
- 开始日食。(它应该显示一条错误消息或一个空的工作区,因为没有找到项目。)
- 关闭所有打开的编辑器选项卡。
- 退出日食。
rm -rf org.eclipse.core.resources
(删除新创建的目录。)mv org.eclipse.core.resources.bak/ org.eclipse.core.resources
(恢复原目录。)- 启动eclipse并开始工作。:-)
回答by Gondy
I also had similar problem. Eclipse (Luna) started normally with splash screen, then opened main window and immediately freeze. For me running eclipse with
我也有类似的问题。Eclipse (Luna) 以闪屏正常启动,然后打开主窗口并立即冻结。对我来说,运行日食
eclipse.exe -clean -refresh
fixed the problem.
解决了这个问题。
回答by TK Gospodinov
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.
尝试使用 -console 和 -consoleLog 标志重新启动 eclipse。当您可以与 OSGi 交互并查看平台输出时,这将打开一个控制台窗口。您可以将这些标志放在 eclipse 文件夹(eclipse.exe 所在的位置)的 eclipse.ini 中。在控制台窗口中,键入“ss”,这将显示加载和启动的插件。这可能会指出缓慢的原因。您可以键入 start 和 stop 来启动和停止 OSGi 包。另外,请确保您的 eclipse.ini 中没有“-clean”,因为它会导致重新加载所有插件,这可能会导致一些缓慢。
回答by Ramin
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.
我已经通过直接下载和软件中心安装了 Eclipse,但是在 ubuntu 12.04 LTS 上,除非删除 ~/workspace 目录,否则它们似乎都挂在启动屏幕上。
I found that by clicking on the splash screen and then pressing Enter it launches perfectly fine even without removing the ~/workspace directory!!
我发现通过单击启动屏幕然后按 Enter,即使不删除 ~/workspace 目录,它也能正常启动!!
回答by Adam Gent
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:
虽然@CharlesB 对我来说可能适用于大多数人,但它不会因为 Eclipse 通常会破坏单个项目(通常是最后一个项目)。因此,我找到了删除链接项目.snap
和.history
什么我认为是最后一个项目或整个文件夹以更好地工作:
WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.projects/LAST_PROJ_BEFORE ECLIPSE_CRASHED
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
).
然后重新启动eclipse,您将看到LAST_PROJ_BEFORE_ECLIPSE_CRASHED
关闭。删除它,因为您将无法打开现有项目并将其重新导入工作区(您链接的项目仍将具有.project
)。
回答by sri_bb
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.
删除本地工作区中的 .metadata 文件夹(这对我有用)。它似乎包含一个 .LOCK 文件,如果没有正确关闭,会阻止 eclipse 正常启动。
This is Perfectly working.
这是完美的工作。
回答by Nisha
For me below was fix
对我来说下面是修复
In eclipse.ini, make sure it is pointing to java8 with correct jvm.dll vm entry.
在 eclipse.ini 中,确保它指向具有正确 jvm.dll vm 条目的 java8。
-vm
C:\Program Files\Java\jre1.8.0_131\bin\server\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
回答by daniel sp
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
在我的情况下,它在启动屏幕中冻结,同时在选择工作区后加载“view.ui”。修复是运行它: eclipse -clean -clearPersistedState