Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover corrupted Eclipse workspace?

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, plugins and setting does not sound too interesting. I ended up moving .metadata/.plugins/org.eclipse.core.resources/ elsewhere and reimporting my projects only.

Are there any tools or best practices to recover workspace?

like image 555
Petteri H Avatar asked Jun 04 '09 13:06

Petteri H


People also ask

Where is .metadata of Eclipse workspace?

You should find something like your-eclipse-workspace\. metadata\. plugins\org. eclipse.

Can I copy Eclipse workspace to another computer?

I copy the workspace to a USB flash memory drive, carry it home in my pocket, copy the workspace to the hard drive on my home computer, start Eclipse, and choose File->SwitchWorkspace.


1 Answers

When workspace is damaged and Eclipse cannot start, even using the -clean option, removing single file workspace/.metadata/.plugins/org.eclipse.core.resources/.snap may help (source: comments to article https://web.archive.org/web/20200517003712/https://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/).

Update: when Eclipse 4.X cannot start after crash, try to start with -clearPersistedState option; if it didn't help then remove file workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi (sources: https://www.eclipse.org/forums/index.php/m/1269045/ https://www.eclipse.org/forums/index.php/t/522428/ https://bugs.eclipse.org/bugs/show_bug.cgi?id=404873). Note: you'll lose configuration of your perspective/views/tabs.

Update: Subversive plugin may be responsible for inability to start Eclipse with corrupted metadata. If you have Subversive plugin installed, update it to latest build (at least 0.7.9.I20120210-1700) from update-site. Related bugs 372621 and 370374 were fixed by Subversive developers.

like image 80
Victor Avatar answered Oct 05 '22 04:10

Victor