How do I prevent Eclipse from hanging on startup?

前端 未结 30 1979
半阙折子戏
半阙折子戏 2020-11-28 00:36

I am using Eclipse 3.3 (\"Europa\"). Periodically, Eclipse takes an inordinately long time (perhaps forever) to start up. The only thing I can see in the Eclipse log is:

相关标签:
30条回答
  • 2020-11-28 01:00

    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
    
    0 讨论(0)
  • 2020-11-28 01:01

    Unfortunately, none of these solutions worked for me. I ended up having to create a new workspace, then imported the existing projects into the new workspace. Unfortunately, you lose your preferences when doing so (so, remember to export your settings anytime you change them!)

    0 讨论(0)
  • 2020-11-28 01:02

    It can also be caused by this bug, if you're having Eclipse 4.5/4.6, an Eclipse Xtext plugin version older than v2.9.0, and a particular workspace configuration.

    The workaround would be to create a new workspace and import the existing projects.

    0 讨论(0)
  • 2020-11-28 01:03

    In my case (Juno) I had to do this:

    find $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.core.resources/.projects \
    -name .indexes -exec rm -fr {} \;
    

    That did the trick.

    Initially I thought it was a problem with Mylyn (I experienced these freezes after I started using its generic web connector), but the problem appeared even after uninstalling the connector, and even deleting the .mylyn directories.

    Edit: I also managed to restart eclipse by deleting just one file:

    rm $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
    

    That worked fine, without any indexes involved. Only the workbech, which I personally don't mind that much.

    0 讨论(0)
  • 2020-11-28 01:04

    This one works for me:

    Another, and a bit better workaround which apparently works:

    1. Close Eclipse.
    2. Temporary move offending project somewhere out of the workspace.
    3. Start Eclipse, wait for workspace to load (it should).
    4. Close Eclipse again.
    5. Move the project back to workspace.

    Source: Eclipse hangs while opening workspace after upgrading to GWT 2.0/Google app engine 1.2.8

    0 讨论(0)
  • 2020-11-28 01:04

    Watch out for zero-byte .plugin files in the {WORKSPACE-DIR}/.metadata/.plugins folder. I just deleted one in there and it fixed my freezing issues.

    0 讨论(0)
提交回复
热议问题