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:
Override Apache Xerces Included in Java SE 8
How to use newer version of Apache Xerces instead of the default version included in Java SE 8? I have Apache Xerces 2.11.0 installed.
✍: FYIcenter
If you want to override the default version of Apache Xerces included in Java SE, you can just simplly provide the path name of the xercesImpl.jar of your own Apache Xerces installation in the "java -cp" option.
Here is an example showing how to override Apache Xerces 2.7.1 in Java SE with Apache Xerces 2.11.0:
1. Make sure Apache Xerces 2.11.0 is installed in the \fyicenter\xerces-2_11_0 folder.
2. Compare the version numbers of the Apache Xerces package of from Java SE 8 installation and your own Apache Xerces installation:
>\fyicenter\jdk-1.8.0\bin\java com.sun.org.apache.xerces.internal.impl.Version Xerces-J 2.7.1 >\fyicenter\jdk-1.8.0\bin\java -cp .;\fyicenter\xerces-2_11_0\xercesImpl.jar org.apache.xerces.impl.Version Xerces-J 2.11.0
3. Run the test program DomClassInfo.java with the default version of Apache Xerces in Java SE 8:
>\fyicenter\jdk-1.8.0\bin\java DomClassInfo DOM class info: Factory: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl Builder: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl Document: com.sun.org.apache.xerces.internal.dom.DocumentImpl Element: com.sun.org.apache.xerces.internal.dom.ElementImpl TextNode: com.sun.org.apache.xerces.internal.dom.TextImpl
4. Run the test program DomClassInfo.java with the newer version of Apache Xerces from xercesImpl.jar
>\fyicenter\jdk-1.8.0\bin\java -cp .;\fyicenter\xerces-2_11_0\xercesImpl.jar;\fyicenter\xerces-2_11_0\serializer.jar DomClassInfo DOM class info: Factory: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl Builder: org.apache.xerces.jaxp.DocumentBuilderImpl Document: org.apache.xerces.dom.DocumentImpl Element: org.apache.xerces.dom.ElementImpl TextNode: org.apache.xerces.dom.TextImpl
⇒ DomDocumentTree.java - Build DOM Document Tree
⇐ Version of Apache Xerces Used in Java SE 8
2017-09-08, 3692🔥, 0💬
Popular Posts:
JDK 11 jdk.jconsole.jmod is the JMOD file for JDK 11 JConsole tool, which can be invoked by the "jco...
What Is poi-scratchpad-3.5.jar? poi-scratchpad-3.5.jar is one of the JAR files for Apache POI 3.5, w...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...
What Is commons-io-2.11.jar? commons-io-2.11.jar is the JAR file for Commons IO 2.5, which is a libr...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...