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 / Java 3D / August 2005

Tip: Looking for answers? Try searching our database.

NoClassDefFoundError - how to handle during runtime

Thread view: 
Konrad Viltersten - 23 Aug 2005 22:41 GMT
I have compiled a program (no errors, no warnings) but as i
try to run it i get a run-time error - NoClassDefFoundError.
I was surprised as i thouth it would occur during the
process of compiling...

So, what can i do about it? Obviously everything is in place
as i get a nice .CLASS file. What can i do to obtain more
information on what's wrong?

If it matters, i'm trying to play around with OpenGL and
i'm using JOGL. The class that is supposed not to be there
is GLEventListener. WinXP, JDK1.5.0. What can i have
forgotten in my desperation?

Signature

Vänligen
Konrad
---------------------------------------------------

Sleep - thing used by ineffective people
           as a substitute for coffee

Ambition - a poor excuse for not having
                enough sense to be lazy

---------------------------------------------------

Roedy Green - 23 Aug 2005 23:21 GMT
> NoClassDefFoundError.

see
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

You debug your code so these don't happen.  If you get one in
production you need to fall on your sword. It is too late do anything
sensible.  The code you need is MISSING. Unless there is some
desperate way to carry on without the code you requested, you are
hosed.

There are a few cases, usually involving classForName, where there are
natural recoveries. The JCE on discovering part of a plugin was
missing might just delete that plugin from its support list. There
still may be other vendor implementations to fall back on.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com

Hemal  Pandya - 26 Aug 2005 10:54 GMT
> > NoClassDefFoundError.
>
> see
> http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

The seventh bullet says:

Make sure you said java.exe MyClass or java.exe MyClass.java not
java.exe MyClass.class.

It seems the logical operators got swapped. java.exe MyClass.java would
give error java.lang.NoClassDefFoundError: MyClass/java. The correct
text would be:

Make sure you said java.exe MyClass not java.exe MyClass.java or
java.exe MyClass.class.


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.