231

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?

matt b
  • 138,234
  • 66
  • 282
  • 345
Simon Nickerson
  • 42,159
  • 20
  • 102
  • 127
  • 4
    solution in this question worked for me :) – Charith De Silva Oct 10 '13 at 22:12
  • http://stackoverflow.com/questions/7847359/eclipse-wont-start-but-no-error-is-shown – Rajan Feb 02 '14 at 12:15
  • One thing to be aware of - when Eclipse starts, builds or if you are using source control it compares the local directory to the repository, it scans the project directory(s). So if you are writing a lot of output files locally then Eclipse will have to scan it -even if it's in workspace/your_project/tmp. If the amount of files is really big (say you are simulating a database with local files) this could take some time. This will cause the kind of instabilities that people report here. Best to put data like that somewhere else. – Mark Butler Jun 19 '14 at 00:05

36 Answers36

268

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
cldy1020
  • 711
  • 2
  • 9
  • 15
Jason
  • 2,977
  • 1
  • 17
  • 7
  • I also needed to remove the .markers.snap files for my projects to get Eclipse to start. – Anthony Giorgio Aug 10 '10 at 18:48
  • 2
    This file didn't exist on my version. – User1 Feb 16 '11 at 15:47
  • 75
    2011-06-08: Under Eclipse 3.6 (Helios), the corresponding file seems to be `.metadata/.plugins/org.eclipse.core.resources/.snap` . I killed that file and presto, Eclipse started up again. I just noticed this duplicates the answer by joj. – Carl Smotricz Jun 09 '11 at 15:32
  • 12
    Removing the .metadata\.plugins\org.eclipse.core.resources\.projects\\.markers.snap didn't work for me. I had to remove the .metadata/.plugins/org.eclipse.core.resources/.snap – 1.21 gigawatts Feb 08 '12 at 19:07
  • 4
    I too had to remove the .metadata/.plugins/org.eclipse.core.resources/.snap thanks Donny Kumia an 1.21 gigawatts – Andrew Mackenzie Jun 15 '12 at 07:23
  • @Carl Smotricz Removing .metadata/.plugins/org.eclipse.core.resources/.snap worked for me. – dstibbe Sep 10 '12 at 08:30
  • I didn't find .markers.snap, but when I deleted *.snap from every subdir of .metadata directory, Eclipse started just perfectly. I guess it's safe to delete .snap files. – fernacolo Oct 02 '12 at 00:04
  • There is no .projects directory under \org.eclipse.core.resources – IgorGanapolsky Nov 16 '12 at 20:13
  • @Carl I have no .snap file under org.eclipse.core.resources – IgorGanapolsky Nov 16 '12 at 20:13
  • 1
    Is there a way to prevent eclipse from reaching a state where these files need to be deleted? It hangs on launch quite regularly. – Rarw Mar 05 '13 at 14:36
  • Worked for me in Juno, although I now have to do this every time. I never had an issue until I ran update software last week. – juminoz May 16 '13 at 04:37
  • Note that sometimes `.metadata` may be hidden. On Ubuntu press Ctrl + H, while in workspace directory, to see it. – Piotr Chojnacki Jun 21 '13 at 05:18
  • On my Windows 7, it was `.metadata\.plugins\org.eclipse.core.resources\.projects\\.markers` – Nirmal Oct 24 '13 at 20:51
  • 2
    Just removing the .snap file as @1.21gigawatts, was enough for me to get it to work. – marlonp33 Mar 18 '14 at 13:20
  • Is there a bug tracker issue we can follow or commit to in order to fix this, it keeps happening every time I restart my computer. – Ray Foss Sep 15 '14 at 11:47
  • @MikePatel url for handbook pls? ^_^ – Archimedes Trajano Nov 14 '16 at 15:58
  • 1
    With Eclipse-oxygen-4.7.3a, I removed `.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources` - which unfortunately resulted in having to re-import from maven projects. – Randall Whitman Aug 07 '18 at 23:54
239

try:

  1. cd to <workspace>\.metadata\.plugins\org.eclipse.core.resources
  2. remove the file *.snap (or .markers in Indigo)
Siddharth
  • 9,349
  • 16
  • 86
  • 148
  • 4
    You're my god! BTW, what does this .snap normally do? – Michał Pękała Jan 09 '11 at 22:17
  • 1
    This file existed for me, but .metadata.plugins\org.eclipse.core.resources.projects\.markers.snap mentioned on the other answer did not. I didn't seem to lose anything critical from my workspace by deleting this file. – User1 Feb 16 '11 at 15:48
  • 1
    @MichałPękała I also was wondering on the effect of deleting this file, I've found another question that answers a bit that:[What are the snap files in eclipse](http://stackoverflow.com/questions/2026502/what-are-snap-files-in-eclipse) – pconcepcion Aug 26 '12 at 16:18
  • wow worked for me though my problem was not same but similar. Eclipse opens up and shows the code but as soon as I perform any action it goes into an infinite loop. I could have spent my life and could not figure out the problem. Thanks mate. – Ali Oct 10 '12 at 05:05
  • Eclipse should be made to do this automatically on startup if/when it encounters an error. – aroth Apr 16 '13 at 23:36
  • this worked for me: http://off-topic.biz/en/eclipse-hangs-at-startup-showing-only-the-splash-screen/ – stu Jun 30 '14 at 13:18
  • Joy, and happiness. I have Luna on Windows. – Skywalker Feb 21 '16 at 09:38
  • I feel like I've just won the lottery. Thank you! :) del /s /q *.snap in Windows command prompt – Colm Bhandal Nov 02 '16 at 17:06
57

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.

Rafa
  • 1,437
  • 11
  • 7
  • How did you determine that the `.indexes` files were the source of the problem? – Jeff Axelrod Sep 21 '12 at 13:21
  • Trial/error, I am afraid. I suspected it was Mylyn fault, so I started with the .mylyn directory to no avail. Then I read somewhere about eclipse locking while indexing, so I went for those. – Rafa Oct 12 '12 at 09:20
  • 8
    Deleting .markers files didn't work for me, but deleting .indexes and workbench.xmi got my workspace loading again. – Nathaniel Waisbrot Jan 10 '13 at 14:59
  • Tried a lot of stuff and deleting that workbench.xmi did it for me thanks! – Marc Jan 29 '13 at 07:20
  • 4
    Deleting $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi worked for me too (I am running eclipse Mars) – Nenad Jun 23 '16 at 20:01
  • Nenad's way worked for me too. I am using the StatET plugin and when trying to start Eclipse it kept freezing at "Loading de.walware.statet.r.core", and .log said "Conflicting handlers for de.walware.statet.nico.commands...." In any case deleting workbench.xmi worked. I am using Mars.2. – user1310503 Sep 19 '16 at 14:09
  • amazing! totally saved me! Many thanks. Other suggestions did not work for me. – Gene Vayngrib Dec 11 '18 at 01:45
  • @NathanielWaisbrot You saved my life. I have Juno (ADT) and when I found myself in this "frozen/hung" situation, nothing seemed to help: Deleting .snap didn't help. Deleting .indexes didn't help. But when I deleted workbench.xmi, my Eclipse returned to life (i.e. without losing any projects or their information). Thank you. – WebViewer Nov 21 '22 at 20:05
39

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
  • 9,056
  • 6
  • 34
  • 44
35

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

Community
  • 1
  • 1
Hendy Irawan
  • 20,498
  • 11
  • 103
  • 114
  • Thanks @Hendy ! this is the only solution worked for me in Eclipse Luna. – Yassine ElBadaoui Mar 11 '15 at 07:28
  • It does the trick although being a nasty solution for every time eclipse has to be started. Thanks anyways :) – Roberto14 Apr 08 '15 at 09:53
  • As a side note, I had to open a different eclipse version, load the workspace, close it, and then open once again the one I really wanted to use. – rfsbsb Jun 01 '15 at 19:19
  • Eclipse indeed starts "unfrozen" at step #3 but without any project. Moving the project(s) back as in step 5 without moving back .metadata, comes up with an empty Project Explorer pane. Moving back .metadata, restores the frozen/hung behavior. Thus, doesn't work in my situation. The only thing that really helped is https://stackoverflow.com/questions/207843/how-do-i-prevent-eclipse-from-hanging-on-startup/12528785#comment131553160_12528785 – WebViewer Nov 22 '22 at 15:20
31

I used eclipse -clean -clearPersistedState and that worked for me.

Warning: This may remove all projects from the workspace.

Gray
  • 115,027
  • 24
  • 293
  • 354
persianLife
  • 1,206
  • 3
  • 17
  • 22
14

I had a similar problem with a rather large workspace in 3.5 and no .snap-files anywhere to be seen. "Windows -> Preferences -> General -> Startup and Shutdown -> Refresh workspace on startup" seems to be a workspace-related setting and so I couldn't change it for the workspace that was causing the hang.

Running eclipse with the command line parameter -refresh and then changing the setting seems to do the trick.

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
Daniel
  • 1,798
  • 1
  • 13
  • 12
12

I also had luck with removing the *.snap files. Mine were located in a different directory than mentioned in the posts (below).

<eclipse workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects

Consequently, the following unix cmd did the trick:

find <eclipse_workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects  -name "*.snap" -exec rm -f {} \;
Jorgesys
  • 124,308
  • 23
  • 334
  • 268
user555135
  • 121
  • 1
  • 3
8

I tried all of the answers in this thread, and none of them worked for me -- not the snap files, not moving the projects, none of them.

What did work, oddly, was moving all projects and the .metadata folder somewhere else, starting Eclipse, closing it, and then moving them all back.

5

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,059
  • 2
  • 13
  • 25
3

On Mac OS X, you start Eclipse by double clicking the Eclipse application. If you need to pass arguments to Eclipse, you'll have to edit the eclipse.ini file inside the Eclipse application bundle: select the Eclipse application bundle icon while holding down the Control Key. This will present you with a popup menu. Select "Show Package Contents" in the popup menu. Locate eclipse.ini file in the Contents/MacOS sub-folder and open it with your favorite text editor to edit the command line options.

add: "-clean" and "-refresh" to the beginning of the file, for example:

-clean
-refresh
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
Oded Breiner
  • 28,523
  • 10
  • 105
  • 71
3

I did this:

  1. cd to .metadata.plugins\org.eclipse.core.resources
  2. remove the file .snap
  3. Noticed the Progress tab was doing something every few seconds..it seemed stuck
  4. Exit eclipse (DO NOT FILE|RESTART HERE OR YOU HAVE TO GO BACK TO STEP 1 AGAIN)
  5. Open eclipse again.

Using -refresh or -clean when starting eclipse did not help.

User1
  • 39,458
  • 69
  • 187
  • 265
2

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.

Isak Swahn
  • 41
  • 3
1

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

1

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

Is Refresh workspace on startup checked?

matt b
  • 138,234
  • 66
  • 282
  • 345
  • 10
    That might be a tidge hard to assess when the Eclipse workspace won't open in the first place. – russellpierce Jan 19 '11 at 05:25
  • That's not a very helpful comment, @rpierce as you can always specify a different workspace on startup (providing you haven't configured Eclipse to default to a specific workspace at startup, of course!). **You can always set SHOW_WORKSPACE_SELECTION_DIALOG=false in org.eclipse.ui.ide.prefs to undo this, if you have set a default ** On the assumption that you _can_ start up with a different workspace, check the 'Refresh workspace on startup' checkbox, then restart Eclipse and switch back to your original workspace. That should nudge things along. – KRK Owner Apr 16 '14 at 22:09
  • 1
    @user924272: Well 9 people disagreed with your assessment regarding my comment. Nevertheless, I will gladly admit that your comment is more useful... and may indeed provide the sort of information that matt b could have included in his answer that would have made it a better answer. But now the information you've provided is here, and everyone can benefit! – russellpierce Apr 18 '14 at 03:35
1

UFT causing issues with RDz (Eclipse based) after install These suggestions will allow to work around this situation even with the environment variables in place and with corresponding values.

Note: Conflicting application will not be recognized in a java context because it is being excluded from the java support mechanism.

  1. Impact: Excludes Add-ins support from hooking to conflicting application executable via Windows Registry Editor Requirement: The application must be started by an EXE file, except Java.exe/Javaw.exe/jpnlauncher.exe

Instructions:

a. Locate the executable filename of the application conflicting with add-in(s) support. Either use the Task Manager or the Microsoft Process Explorer.

b. Open Windows Registry Editor.

c. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\JavaAgent\Modules For 32bits applications on Windows x64: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\JavaAgent\Modules

d. Create a DWORD value with the name of the conflicting software executable filenmae and set the value to 0.

Updated Registry

ddavisqa
  • 85
  • 10
1

Removing *.snap (mine is *.markers), --clean-data or move workspace folder seems all did not work for me.

As my eclipse stopped working after I installed and switched my keyborad input to HIME, I went back to fctix and it worked.

adayoegi
  • 117
  • 10
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/19015844) – Vidhi Dave Mar 06 '18 at 05:22
  • 1
    @VishvaDave Isn't the question asking a solution to the problem that Eclipse got stuck? I think we are facing the same problem, and the answer worked in my case. – adayoegi Mar 06 '18 at 05:40
0

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!)

Todd
  • 2,829
  • 5
  • 34
  • 56
0

I had a very similar problem with eclipse (Juno) on Fedora 18. In the middle of debugging an Android session, eclipse ended the debug session. I attempted to restart eclipse but it kept haning at the splash screen. I tried the various suggestions above with no success. Finally, I checked the adb service (android debug bridge):

# adb devices
List of devices attached 
XXXXXX offline

I know the android device was still connected but it reported it offline. I disconnected the device and shut down the adb service:

# adb kill-server

Then I waited a few seconds and re-started the adb service:

# adb start-server

And plugged my android back in. After that, eclipse started up just fine.

Zoccadoum
  • 862
  • 1
  • 10
  • 16
0

no need to delete entire metadata file. just try deleting the .snap file from org.eclipse.core.resources on your workspace folder

ex. E:\workspaceFolder\.metadata\.plugins\org.eclipse.core.resources
user742102
  • 1,335
  • 8
  • 32
  • 51
0

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.

Bo A
  • 3,144
  • 2
  • 33
  • 49
0

What worked for me was this-- On Ubuntu

  1. Ctrl+F1
  2. ps -e
  3. kill -9 for process ids of eclipse, java and adb
Gray
  • 115,027
  • 24
  • 293
  • 354
MayureshG
  • 354
  • 2
  • 5
  • 14
0

In my case similar symptoms were caused by some rogue git repository with a ton of junk system files.

Universal remedy, as mentioned above, is to use Process Monitor to discover offending files. It's useful to set the following 2-line filter:

  • Process Name is eclipse.exe
  • Process Name is javaw.exe
esteewhy
  • 1,300
  • 13
  • 23
0

I had a similar problem after I updated eclipse on Mavericks. Eventually I found that in the eclipse plugins directory the com.google.gdt.eclipse.login jar had version numbers at the end. I removed the version number from the name and it all started fine :)

0

Also look at http://www.lazylab.org/197/eclipse/eclipse-hanging-on-startup-repair-corrupt-workspace/

99% Recommended Solution works.... (i.e. Removing .snap file) But if it did not worked then we have to try to remove indexes folder and further workbench folder.

Nikhil
  • 570
  • 5
  • 12
0

This may help

In your eclipse,

1) Go to Help

2) Click Eclipse marketplace

3) search - optimizer

install "optimizer for eclipse"

enter image description here

Parth Pithadia
  • 276
  • 1
  • 3
  • 18
0

In Ubuntu eclipse -clean -refresh worked for me for Eclipse 3.8.1

Kaidul
  • 15,409
  • 15
  • 81
  • 150
0

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.

Chadi
  • 737
  • 1
  • 6
  • 21
0

Well, I had similar behaviour while starting eclipse over X11. I forgot to tick the enable X11 forwarding in my putty.

Goosebumps
  • 919
  • 2
  • 14
  • 27
0

In my case deleting the .metadata folder of the workspace worked. I am using Eclipse Luna service Release 2.

zafar142003
  • 2,081
  • 2
  • 24
  • 31
0

my solution is to remove this dir:

workspace/.metadata/.plugins/org.eclipse.e4.workbench

what is did was first remove (move it to a save place) all from .metadata. eclipse started all new (all my settings gone). then i added bit by bit back into the .metadata dir until it dit not work again. this way i found i only had to remove this dir. And now Eclipse started with all my settings still in place.

it seems that in the file in this dir the windows which should be opened on startup are listed and some how it could not find one off them so it hung. why i'm unclear because the file which in complained about in the logging was on my filesystem.

tibi
  • 657
  • 1
  • 10
  • 22
0

My freeze on startup issue seemed to be related to the proxy settings. I saw the username\password dialog on startup, but Eclipse froze whenever I tried to click ok, cancel, or even just click away from the dialog. For a time, I was seeing this authentication pop-up with no freeze issue.

To fix it, I started eclipse using a different workspace, which thankfully didn't freeze on me. Then I went to Window --> Preferences --> General --> Network Connections. I edited my HTTP Proxy entry and unchecked "Requires Authentication". Then I started my original problematic workspace, which launched this time without freezing. Success!

I had no further issues when I re-opened my workspace, and was able to re-enable authentication without having a problem. I didn't see the username\password pop-up anymore on start-up, so there's a chance my authentication info was FUBAR at the time.

Using: MyEclipse, Version: 2016 CI 7, Build id: 14.0.0-20160923

Mark F Guerra
  • 892
  • 10
  • 13
0

I did a lot of these solutions and none seemed to work for me. What finally did work was to restart my Mac. Duh. I noticed that my jconsole also seemed to be stuck which made me immediately go for a restart because it seemed to be Java related as opposed to Eclipse specifically.

Gray
  • 115,027
  • 24
  • 293
  • 354
0

JAVA VERSION COULD BE PROBLEM:

I tried few answers given above. But it didnot work. But meanwhile I was trying them it clicked to me that I switched the java version for some other stuff & forgot to switch back.

Once I jumped back to the previous version. Eclipse started working for me.

A_01
  • 1,021
  • 11
  • 27
0

The freezing / deadlock can also be caused by this bug on GTK3 + Xorg

https://bugs.eclipse.org/bugs/show_bug.cgi?id=568859

Can be workarounded by using Wayland session, although in my case Eclipse fails to detect reasonable font for some reason and looks like this:

screenshot

Related:

https://www.reddit.com/r/swaywm/comments/bkzeo7/font_rendering_really_bad_and_rough_in_gtk3/

https://www.reddit.com/r/swaywm/comments/kmd3d1/webkit_gtk_font_rendering_on_wayland/

int_ua
  • 1,646
  • 2
  • 18
  • 32
0

I had no snap files. Going through the help menu installation list, at least 90% of my plugins had the uninstall button deactivated so I could not handle it through there. Under startup/shutdown most of plugins were not listed. Instead, I had to manually remove items from my plugins folder. Wow, the startup time is much faster for me now. So if everything else does not work and you have plugins that are disposable, this could be the ultimate solution to use.

demongolem
  • 9,474
  • 36
  • 90
  • 105