Archive

Archive for the ‘How-To’ Category

Recovering a corrupted Eclipse Workspace

January 1st, 2009
Comments Off

I know there are sites available that detail how to recover from a corrupted Eclipse Workspace, so this is more for my benefit.

Recently I’ve begun to experience corrupted workspaces in my Eclipse IDE.  It generally coinsides to my Tomcat server unable to stop in a timely fashion.  Generally I have to kill Eclipse and restart.  Most of the time the workspace won’t restart.

Steps to recover from a corrupted Eclipse Workspace:

  1. Shutdown/kill Eclipse
  2. Open up a command prompt or terminal
  3. Navigate to your workspace
  4. Navigate to /.metadata/.plugins/
  5. remove org.eclipse.core.resources (in terminal rm -r -f org.eclipse.core.resources)
  6. Navigate to your Eclipse home directory
  7. Run eclipse -clean
  8. Launch the corrupted workspace
  9. Re-import your projects; you should be able to re-import all projects straight from the workspace directory
  10. Let the workspace refresh…DONE!

Clearly what this does is remove some Meta Data from the workspace.  By re-importing that Meta Data is restored.  I must say though that this is quit a number of hoops to jump through.  I’m just glad they aren’t firey hoops!

Hopefully someone will find this useful!

James Hawes How-To, Java, Software Development, Tools , ,

Cleaning Eclipse

September 4th, 2008
Comments Off

Every-so-often I find that Eclipse simply begins to “act funny”.  Searches on the internet will produce many reasons why; the most common is associated with all the meta data that Eclipse stores and uses.  One of the more practical, and easiest solutions (let alone produces the best results), is to run a clean on Eclipse.

On windows:

  1. Open a command prompt
  2. Navigate to your eclipse.exe location
  3. run eclipse -clean

On mac/unix:

  1. Open a terminal window
  2. Navigation to your Eclipse installation
  3. run eclipse -clean

James Hawes How-To, Tools , ,