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

Dear all,

I am new in this Java field and XML field. Please help. I have downloaded the latest JDK and JAXP from Sun.

I managed compile a file called Echo01.java and created a file called slideExample01.xml

As I typed "java Echo01 slideExample01.xml" It returns the following error.

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

org/xml/sax/helpers/DefaultHandler

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:403)

at java.security.SecureClassLoader.defineClass

(SecureClassLoader.java:10

1)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)

at java.net.URLClassLoader.access$1(URLClassLoader.java:216)

at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:191)

at java.lang.ClassLoader.loadClass(ClassLoader.java:280)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:275)

at java.lang.ClassLoader.loadClass(ClassLoader.java:237)

The jar files are in c:\jdk1.2.1\jre\lib\ext and the bin files are in

c:\jdk1.2.1\bin

However, my source codes are in d:\xml. Any help is appreciated.

Best regards,

SM.

[1427 byte] By [smngkl] at [2007-9-26 4:41:04]
# 1
Hispecify the JAXP jar file with the -cp command line parameter e.g. java -cp jaxp.jar Echo01 slideExample01.xml. Assure that the JAXP jar file is available in the directory where you launch the java vm. Otherwise specify a complete path.Hope this helpsMikno
Mikno at 2007-6-29 18:03:07 > top of Java-index,Archived Forums,New To Java Technology Archive...