Tuesday, December 14, 2010

Eclipse 3.6 M2 and JUnit on Fedora 14

If you are a Fedora user and you recently upgraded to Fedora 14, and you are using Eclipse and you find that after the upgrade Eclipse has no longer support for JUnit (you cannot add a JUnit library to your buildpath; you cannot create a JUnit test case; you cannot run a class as a JUnit test), then here is how to fix that.

In Eclipse 3.6 M2 (Helios) the non-UI parts of the org.eclipse.jdt.junit plugin have been split off into a new plugin org.eclipse.jdt.junit.core. This new plugin is missing in the Fedora 14 eclipse-jdt-3.6.1 package.

You can restore JUnit functionality in Eclipse as follows:

  1. Download org.eclipse.jdt-3.6.zip.
  2. In Eclipse, click Help > Install New Software...
  3. Click Add...
  4. Click Archive...
  5. Select the org.eclipse.jdt-3.6.zip file and click OK.
  6. Uncheck "Group items by category".
  7. Select "Eclipse Java Development Tools".
  8. Click Next, Next, accept the license agreement, and click Finish.
  9. Restart Eclipse.