Eclipse hangs on startup
I've had exactly the same problem and could solve it using the answer here https://stackoverflow.com/a/5504530/1275767 which works by moving the projects out of the workspace and back in again after Eclipse has been started and stopped.
Starting it with -clean -data started eclipse but whenever I switched the workspace using the eclipse gui it wouldn't load.
Eclipse hanging on start up
Yup, JavaHL was the likely cuprit as installing it solved the problem. It's still odd that Eclipse never hung before due to this reason, but after a crash, it did.
Eclipse freezing at startup - before loading workspace
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.
How do I prevent Eclipse from hanging on startup?
This may not be an exact solution for your issue, but in my case, I tracked the files that Eclipse was polling against with SysInternals Procmon, and found that Eclipse was constantly polling a fairly large snapshot file for one of my projects. Removed that, and everything started up fine (albeit with the workspace in the state it was at the previous launch).
The file removed was:
<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\<project>\.markers.snap
Eclipse hangs on loading workbench
DISCLAIMER: THIS WILL DELETE ALL OF YOUR ECLIPSE WORKSPACE SETTINGS AND YOU WILL HAVE TO RE-IMPORT ALL YOUR PROJECTS, THERE ARE LESS DESTRUCTIVE ANSWERS HERE
Try the following:
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. On Unix based systems you can type following on command line;
rm -r workspace/.metadata
Delete your .eclipse directory in your home directory. Launch eclipse. If that doesn't work,
Open eclipse under another user account. If it loads, you know the problem is with your account, not your eclipse installation.
Recurring eclipse hanging
Turns out the problem was that eclipse was processing the sessions directory which I had configured to exist within the projects root directory. Anytime I refreshed the tree it processed all the sessions files which apparently was enough to take 10+ minutes. Weird.
After telling eclipse to exclude it, all is well again.
Update:
If you're having the same problem I had, then in eclipse you should be able to see a directory that is full of hundreds or thousands of text files. Eclipse will try to process them. To tell it not to, right click on the project, then click properties -> resource -> resource filters
. Add an exclude all rule where the name matches the folder name. You may also want to do this for any .svn folders or the like.
How do I prevent Eclipse from hanging on startup?
This may not be an exact solution for your issue, but in my case, I tracked the files that Eclipse was polling against with SysInternals Procmon, and found that Eclipse was constantly polling a fairly large snapshot file for one of my projects. Removed that, and everything started up fine (albeit with the workspace in the state it was at the previous launch).
The file removed was:
<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\<project>\.markers.snap
Related Topics
Why Isn't Calling a Static Method by Way of an Instance an Error For the Java Compiler
Scanner Double Value - Inputmismatchexception
Difference Between Dto, Vo, Pojo, Javabeans
Why Can't Static Methods Be Abstract in Java
How to Retrieve a File from a Server Via Sftp
How to Access Static Resources When Mapping a Global Front Controller Servlet on /*
Maven Dependencies Are Failing With a 501 Error
Calling a Servlet from Jsp File on Page Load
How to Check the Jdk Version Used to Compile a .Class File
Math.Random() Versus Random.Nextint(Int)
How to Pass an Array as Arguments to a Method With Variable Arguments in Java