可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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?
回答1:
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.)
回答2:
Maybe this blog post could 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. :-)
回答3:
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.
回答4:
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.exe -clean -refresh
fixed the problem.
回答5:
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.
回答6:
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!!
回答7:
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:
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
).
回答8:
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.
回答9:
For me below was fix
In eclipse.ini, make sure it is pointing to java8 with correct jvm.dll vm entry.
-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
回答10:
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.
回答11:
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.
回答12:
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.
回答13:
For Linux users. My startup freezes stopped after I did Eclipse cache cleanup. When Eclipse was not running I did the following:
- Clean up all "cache" and ".cache" directories under .workspace/.plugins
- Clean up all "cache" and ".cache" directories under ${HOME/}/.eclipse
After that Eclipse startup time went back to reasonable 5-10 sec.