Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exeption in thread main...

Status
Not open for further replies.

haneo

Programmer
Jan 2, 2002
274
CA
excuse me i have sent this email to SAX mailling site there is no activity in it !!

i have downloded sax2r2.jar and decompressed to c:and downloded the &quot;xercesImpl.jar&quot; from apache org (the xml parser) and extracting it to <JDK>/jre/lib/ext/
so i got many files and one of theme is <JDK>\jre\lib\ext\org\apache\xerces\parsers\SAXParser.class

i compile the MySAXApp.java exemple comming with sax2r2.jar file with success. but whencompiling with this comand as sayed in the site tutorial:

c:\>java -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser MySAXApp sample.xml
i got this error:
Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
at java.lang.ClassLoader.defineClass0(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)


can some body help ? where is the problem ?

i verified and THERE IS the file:
C:\jdk1.3.1_04\jre\lib\ext\org\xml\sax\helpersDefaultHandler.class

???!!!
 
did you set the target? -Greg :-Q

flaga.gif
 
mackey thanks very much for your post.
but excuse me i have not anderstand what you meen by &quot;target&quot; ?
 
>> and downloded the &quot;xercesImpl.jar&quot; from apache
>> org (the xml parser) and extracting it to

I dont't believe you are supposed to exract the files into JRE/lib/ext. At least I have never tried that. You just put the .jar file in it.

Hope this helps
-pete
 
my fault for not expanding, i was short on time...some java programs require you to set the target (tell it which class the main object is found in) -Greg :-Q

flaga.gif
 
i have just resolved my problem :D !
i had just add the classpath to my environnement

thanks for all ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top