Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JAR Files Required to Run sax\Counter.java
What JAR files are required to run sax\Counter.java provided in the Apache Xerces package?
✍: FYIcenter
You can follow this toturial to find out what JAR files are required to run sax\Counter.java provided in the Apache Xerces package.
1. Create an XML file in the \fyicenter\xerces-2_11_0\ folder:
\fyicenter\xerces-2_11_0\samples>type User.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Copyright (c) 2017 FYIcenter.com --> <User> <ID>101</ID> <BirthDate>1970-01-01+00:01</BirthDate> <Name>Frank Y. Ivy</Name> <Sex> Male</Sex> </User>
2. Compile the sax\Counter.java and run it. Execution fails with missing org.apache.xerces.parsers.SAXParser:
\fyicenter\xerces-2_11_0\samples>\fyicenter\jdk-1.8.0\bin\javac sax\Counter.java Note: sax\Counter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. \fyicenter\xerces-2_11_0\samples>\fyicenter\jdk-1.8.0\bin\java -cp . sax.Counter User.xml error: Unable to instantiate parser (org.apache.xerces.parsers.SAXParser)
3. Run it again with xercesImpl.jar. Execution fails with missing org.apache.xerces.parsers.DOMParser class:
\fyicenter\xerces-2_11_0\samples>\fyicenter\jdk-1.8.0\bin\java -cp .;..\xercesImpl.jar sax.Counter User.xml User.xml: 0 ms (5 elems, 0 attrs, 0 spaces, 58 chars)
1 JAR file is needed to run dom.Counter: xercesImpl.jar.
⇒ sax\Writer.java - Apache Xerves SAX Sample
⇐ sax\Counter.java - Apache Xerves SAX Sample
2017-10-23, 10050🔥, 0💬
Popular Posts:
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
What is the dom\GetElementsByTagName .javaprovided in the Apache Xerces package? I have Apache Xerce...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...