How to recover corrupted Eclipse workspace?

后端 未结 15 1040
醉酒成梦
醉酒成梦 2020-12-07 16:43

I just managed to corrupt contents of my Eclipse .metadata directory. Starting up with eclipse -clean did not work out. Deleting .metadata and then importing all projects, p

15条回答
  •  余生分开走
    2020-12-07 17:15

    One more solution that I've discovered by accident, and may help someone:

    1. Back up the corrupted workspace.
    2. Move half of you projects to some temporary location.
    3. Start Eclipse, if it works, go to step 5.
    4. Move the half of projects you've removed back into the workspace, move out the other half. If you've already done that, keep removing/readding your projects in a binary search manner. Go to step 3.
    5. Exit Eclipse, move back all your projects, and start it again. You should see now that some of your projects are closed (and in the wrong working sets). Re-open your projects and move them to the correct working sets.

    In my case, it was a project that got corrupted, and not the entire workspace (attempting to import said project into a fresh workspace caused it to fail as well). So, I've started to search for the faulty project - instead, I got the result described above.

提交回复
热议问题