Eclipse Ganymede suffering from NoClassDefFoundError SWTResourceUtil

eclipse48Several users of Eclipse Ganymede out there are reporting a java.lang.NoClassDefFoundError for class SWTResourceUtil. That's because some plugins (like the Hibernate Tools and Subversive) are still relying on the presence of this class that was present in older versions of Eclipse.

Here's how you can fix this.

Download the previous version of eclipse. I still have my copy of Eclipse 3.2.2 laying around. In the plugins directory of your Eclipse installation, locate the workbench jar. For my Ubuntu installation of 3.2.2 I find it under this path : /usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.2.2.M20070119-0800.jar.

Browse to org/eclipse/ui/internal/util to locate the SWTResourceUtil.class file :

screenshot-orgeclipseuiworkbench_322m20070119-0800jar-read-only

Extract the file from the jar file (a jar file is basically a zip file). Now locate the workbench jar file under the plugins directory from your Ganymede installation. Here's where I find mine : /home/koen/eclipse-ganymede/plugins/org.eclipse.ui.workbench_3.4.2.M20090127-1700.jar

Now simply insert the SWTResourceUtil.class file in this jar at the same directory location of course.

Done ;-)

Tags:

Leave a Reply