• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Dom sample program  RSS feed

 
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
 
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
 
Goodbye moon men. Hello tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!