Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » NoClassDefFoundError(Problem with swt.jar on Windows)
NoClassDefFoundError [message #487271] Tue, 22 September 2009 15:57
Mark Fenbers is currently offline Mark Fenbers
Messages: 48
Registered: July 2009
Location: Ohio, USA
Member
I've seen errors NoClassDefFoundException and ClassNotFoundExceptions more than I am willing to admit, and I have always been able to solve them rather easily. But I've got one now that has baffled me for almost 6 hours now.

The obvious things to look for is if swt.jar is in the jar's manifest... It is, along with a dozen or so other jars that don't generate errors. And so I made sure the Windows version (XP) of swt.jar was in the current working directory along with all the other jars the program needs. I downloaded the latest (swt-3.5-win32-win32-x86.zip) just to make sure.

I also tried explicitly setting the CLASSPATH environment var to include swt.jar (shouldn't need to, though, if it is in the ClassPath of the manifiest file). So I'm at my wits end as to why I get the error below. Anyone have any ideas?
Mark

O:\mark\GIFTS>java -jar GIFTS.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/inter
nal/win32/TEXTMETRICW
at gov.noaa.ohrfc.GIFTS.main(GIFTS.java:80)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.internal.win32.TEXT
METRICW
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
Previous Topic:Text Field with buttons in it
Next Topic:SWT. Table with Table Editor
Goto Forum:
  


Current Time: Wed Sep 17 03:38:36 GMT 2014

Powered by FUDForum. Page generated in 0.08625 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software