File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dom sample program

 
Simon Xu
Ranch Hand
Posts: 235
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not restart my computer. Now it works!
Thanks,
Simon
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic