views:

7493

answers:

13

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:

    !ENTRY org.eclipse.core.resources 2 10035 2008-10-16 09:47:34.801
    !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

Googling reveals someone's suggestion that I remove the folder:

workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes

This does not appear to have helped.

Short of starting with a new workspace (something which I am not keen to do, as it takes me hours to set up all my projects again properly), is there a way to make Eclipse start up properly?

+2  A: 

You can try to start Eclipse first with the -clean option.

On windows you can add the -clean option to your shortcut for eclipse. On linux you can simply add it when starting eclipse from the command line.

Ruben
+1  A: 

Windows -> Preferences -> General -> Startup and Shutdown

Is Refresh workspace on startup checked?

matt b
+17  A: 

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: .metadata.plugins\org.eclipse.core.resources.projects\.markers.snap

Jason
This worked for me too and I'm on Ubuntu. Thanks.
rmcc
I also needed to remove the .markers.snap files for my projects to get Eclipse to start.
Nighthawk
+1 Just saved me having to recreate my entire workspace - cheers!
chrispy
+13  A: 

try:

  1. cd to <workspace>\.metadata\.plugins\org.eclipse.core.resources
  2. remove the file .snap
This worked for me.
Chase Seibert
This worked for me. Took me forever to figure this out!
Brian
+1  A: 

I just had problems with Eclipse starting up. It was fixed by deleting this file:

rm org.eclipse.core.resources.prefs

I found in .settings

ראובן
A: 

As mentioned above, deleted the .snap file under \workspace.metadata.plugins\org.eclipse.core.resources. that worked. - Thanks!

Balaji Paulraj
A: 

deleting .metadata.plugins\org.eclipse.core.resource.snap worked for me too. Gotta wonder why Eclipse doesn't do this automatically :-P

kenyee
+1  A: 

Since I don't have a .snao or .prefs file in .metadata.plugins\org.eclipse.core.resources folder (running on OS X), what did the trick for me was copy the .project folder to old.project, start Eclipse, and check

Windows -> Preferences -> General -> Startup and Shutdown -> Refresh workspace on startup

as proposed by matt b. After that, I closed Eclipse, renamed the folder old.projects back to .projects and after that everything worked fine again.

VHristov
+1  A: 

Check that the Workspace Launcher hasn't opened on your TV or some other second monitor. It happened to me. The symptoms look the same as the problem described.

A: 

Deleting the .snap file as mentioned above solved my eclipse hanging issue. Thanks a lot and I appreciate the folks here for their valuable contribution.

Sreedhar Aeddy
A: 

worked for me too on OSX!

had to unhide hidden files first though (in terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder

)

dom
A: 

Another success by removing .snap! Hope there's no side effects.

Jeff
-1: This is not an answer.
Michael Donohue