NoClassDefFoundError & NumberFormatException - Newbie Question

Jeff Sinason jsinason at swbell.net
Thu Dec 30 07:42:19 PST 1999


Hello all,

I just finished setting up RH 6.0 with the server install.  I then installed
Kaffe ( also tried the Blackdown and IBM JDK's) and ran into
some problems.

I wrote a quick and dirty test program because the other programs weren't
working.  One was an application the other was an applet.

Here's the source for the application:

import java.io.*;

public class test2 {

        public static void main () {

                System.out.print("This is a test.");
        }
}

Pretty simple pretty basic. Program seems to compile fine.  However when I
run it  I get the following messages:

java.lang.NoClassDefFoundError: test2/class
        at java.lang.Throwable.<init>(Throwable.java:40)
        at java.lang.Error.<init>(Error.java:21)
        at java.lang.LinkageError.<init>(LinkageError.java:21)
        at
java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:21)

I've tried this with Kaffe, Blackdown and the IBM JDK all with the same
results.  My guess is that something is missing on my system
but I don't have a clue.

Given that I decided to try an applet..... Here's the source for it:

import java.applet.Applet;
import java.awt.Graphics;

public class Welcome extends Applet {

        public void paint ( Graphics g) {

                g.drawString("Welcome to Java",25,25);

        }
}

Again, it compiles fine.  However when I run it I get the
NumberFormatException message.  I tried this with all 3 JDKs also.


Any suggestions would be greatly appreciated.


Thanks in advance.....

Jeff Sinason







More information about the kaffe mailing list