Hi,
w/ Eclipse 3.1, I wrote a small Java application making use of the JXTA
libraries (distributed as JAR files), then I exported my project as a
JAR file including my classes together w/ the JXTA libraries. When I
type "java -jar myapp.jar", I get the following message:
java.lang.NoClassDefFoundError:
net/jxta/discovery/DiscoveryListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
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)
Exception in thread "main"
Could someone explain me what I do wrong and how I can solve this
problem? Any help will be very much appreciated. Many thanks, Eric.
Roedy Green - 29 Sep 2005 17:09 GMT
>java.lang.NoClassDefFoundError:
My sympathies. That is my least favourite error message. I have
documented 31 causes for it.
See
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.