Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dom sample program

 
Simon Xu
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I downloaded Jaxp1.0.1 and tried to run sun DOM sample program. It gave the following error.
C:\jaxp1.0.1>java DomEcho01 slidesample01.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/tree/XmlDocument
Should I install something else?
Please help
Simon
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon,
You need to add the jaxp.jar and parser.jar to your CLASSPATH. Assuming you installed JAXP in c:\jaxp1.0.1, then you need to add the following to your CLASSPATH.
set CLASSPATH=c:\jaxp1.0.1\jaxp.jar;c:\jaxp1.0.1\parser.jar;
-Peter
 
Simon Xu
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Peter,
I did add the classpath. In fact, Sax program runs OK, but DOM does not.
Could you figure out for me? Thanks,
Simon
 
Simon Xu
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not restart my computer. Now it works!
Thanks,
Simon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic