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 / November 2005

Tip: Looking for answers? Try searching our database.

Exception in thread "main" java.lang.NoClassDefFoundError: trying to run .jar

Thread view: 
brightoceanlight@hotmail.com - 04 Nov 2005 16:13 GMT
I made a jar file from Eclipse on Linux, but when I try to run the jar
I get the following error :

Exception in thread "main" java.lang.NoClassDefFoundError:

When starting the jar file with java in Linux, does the main class have
to have the same name as the jar file?
brightoceanlight@hotmail.com - 04 Nov 2005 17:24 GMT
Solved it.  The package name wasn't included before the class name in
the shell script when trying to run the main class in the jar.
Roedy Green - 05 Nov 2005 09:07 GMT
>Exception in thread "main" java.lang.NoClassDefFoundError:

This is a nightmare.  I have documented many causes for it. I wish Sun
would do something to split this exception up so that the subspecies
gave you more clues.  I have been juggling the causes over the years
trying to percolate the most common ones to the top.

See
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



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.