- Xerces - Discussion
- Xerces - Useful Resources
- Xerces - Quick Guide
- Modify XML Document
- Create XML Document
- Query XML Document
- Parse XML Document
- Xerces StAX Parser
- Modify XML Document
- Create XML Document
- Query XML Document
- Parse XML Document
- Xerces SAX Parser
- Modify XML Document
- Create XML Document
- Query XML Document
- Parse XML Document
- Xerces DOM Parser
- XML Parsers
- Xerces Environment Setup
- XML Overview
- Xerces Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apache Xerces - Environment Setup
This chapter takes you through the process of setting up Apache Xerces on Windows and Linux based systems. Apache Xerces can be easily installed and integrated with your current Java environment following a few simple steps without any complex setup procedures. User administration is required while installation.
System Requirements
JDK | Java SE 2 JDK 1.5 or above |
---|---|
Memory | 1 GB RAM (recommended) |
Disk Space | No minimum requirement |
Operating System Version | Windows XP or above, Linux |
Let us now proceed with the steps to install Apache Xerces.
Step 1: Verify your Java Installation
First of all, you need to have the Java Software Development Kit (SDK) installed on your system. To verify this, execute any of the two commands depending on the platform you are working on.
If the Java installation successful, then it will display the current version and specification of your Java installation. A sample output is given in the following table.
Platform | Command | Sample Output |
---|---|---|
Windows | Open Command Console and type − java -version | Java version "1.7.0_60" Java (TM) SE Run Time Environment (build 1.7.0_60-b19) Java Hotspot (TM) 64-bit Server VM (build 24.60b09,mixed mode) |
Linux | Open command terminal and type − $java -version | Java version "1.7.0_25" Open JDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64) Open JDK 64-Bit Server VM (build 23.7-b01, mixed mode) |
We assume the readers of this tutorial have Java SDK version 1.7.0_60 installed on their system.
In case you do not have Java SDK, download its current version from
and have it installed.Step 2: Set your Java Environment
Set the environment variable JAVA_HOME to point to the base directory location where Java is installed on your machine. For example,
Sr.No. | Platform & Description |
---|---|
1 | Windows Set JAVA_HOME to C:ProgramFilesjavajdk1.7.0_60 |
2 | Linux Export JAVA_HOME = /usr/local/java-current |
Append the full path of the Java compiler location to the System Path.
Sr.No. | Platform & Description |
---|---|
1 |
Windows Append the String "C:Program FilesJavajdk1.7.0_60in" to the end of the system variable PATH. |
2 |
Linux Export PATH = $PATH:$JAVA_HOME/bin/ |
Execute the command java version from the command prompt as explained above.
Step 3: Install Apache Xerces Library
Download the latest version of Apache Xerces from
and unzip its contents to a folder from where the required pbraries can be pnked to your Java program. Let us assume the files are collected in a folder xerces-2_12_1 on the C drive.Add the complete path of the five jars as highpghted in the above image to the CLASSPATH.
Sr.No. | Platform & Description |
---|---|
1 | Windows Append the following strings to the end of the user variable CLASSPATH − C:xerces-2_12_1 esolver.jar; C:xerces-2_12_1seriapzer.jar; C:xerces-2_12_1xercesImpl.jar; C:xerces-2_12_1xercesSamples.jar; C:xerces-2_12_1xml-apis.jar; |
2 | Linux Export CLASSPATH = $CLASSPATH − /usr/share/xerces-2_12_1 esolver.jar; /usr/share/xerces-2_12_1seriapzer.jar; /usr/share/xerces-2_12_1xercesImpl.jar; /usr/share/xerces-2_12_1xercesSamples.jar; /usr/share/xerces-2_12_1xml-apis.jar; |