Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / September 2005

Tip: Looking for answers? Try searching our database.

Export JAR file

Thread view: 
NOSPAM, Eric - 29 Sep 2005 15:38 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.