c*******d 发帖数: 353 | 1 In "Java & XML 2" I tried to follow the example
in Chapter 3. I downloaded the parser packages from apache website but I
couldn't find the mentioned xerces.jar file instead all evidence points to
xml-apis.jar. The code compiles ok but when I tried to run it, here is the
error message:
~/source_code/java/javaxml2/ch03/src]60: java -classpath
"../../lib/xerces-2_6_2/:." javaxml2.SAXTreeViewer ../xml/contents.xml
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
at
org.x |
r********u 发帖数: 3 | 2 try
~/source_code/java/javaxml2/ch03/src]60: java -classpath "../../lib/xerces-2_6_2/xml-apis.jar:." javaxml2.SAXTreeViewer ../xml/contents.xml
^^^^^^^^^^^
【在 c*******d 的大作中提到】 : In "Java & XML 2" I tried to follow the example : in Chapter 3. I downloaded the parser packages from apache website but I : couldn't find the mentioned xerces.jar file instead all evidence points to : xml-apis.jar. The code compiles ok but when I tried to run it, here is the : error message: : ~/source_code/java/javaxml2/ch03/src]60: java -classpath : "../../lib/xerces-2_6_2/:." javaxml2.SAXTreeViewer ../xml/contents.xml : java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser : at : org.x
|
c*****s 发帖数: 214 | 3 xerces-api只是API,没有完全实现,还需要有个xercesImpl
http://www.ibiblio.org/maven/xerces/jars/ 有你需要的Jar
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:121
【在 c*******d 的大作中提到】 : In "Java & XML 2" I tried to follow the example : in Chapter 3. I downloaded the parser packages from apache website but I : couldn't find the mentioned xerces.jar file instead all evidence points to : xml-apis.jar. The code compiles ok but when I tried to run it, here is the : error message: : ~/source_code/java/javaxml2/ch03/src]60: java -classpath : "../../lib/xerces-2_6_2/:." javaxml2.SAXTreeViewer ../xml/contents.xml : java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser : at : org.x
|