If you are installing or updating the full Java Web Services Developer Pack (Java WSDP), and you will be using the ant script processor that comes with that package, there are no other configuration steps you need to take. The installation/update/scripting process takes care of the details for you.
On the other hand, you'll need to follow the instructions below if:
The JWSDP version of ant automatically sets a system property that points to its lib/common directory for endorsed libraries. That step helps to eliminate the problem of incompatible libraries that may be left over from previous installs. However, it also means that libraries which have been added to <JAVA_HOME>/lib/endorsed are not automatically seen when the JWSDP version of ant runs.
When you download a technology that includes JAXP, like the Java Web Services Developer Pack, the JAXP JAR files are found with the other JARS that are included as part of that technology release. (See the release notes that accompany the technology, for the specific location.)
However, it is sometimes desirable to obtain updated versions of the JAR files individually. The remainder of this section tells you where and how.
Three of the JAR files contain Apache implementations of the parser and transformation classes:
The most recently updated versions of those JAR files can be obtained from
While the implementation jar files correspond to the Apache release,
there is a difference in the packaging of the API jar files. The single
Apache jar file,
xml-apis.jar, is broken up into 3 jar files in
The SAX and DOM APIs are in separate JAR files because they are "endorsed standards" that are built into version 1.4 of the Java platform. That means newer versions of those JAR files can be placed in the endorsed standards directory to update those APIs. (For more information on the SDK's endorsed standards mechanism, see http://java.sun.com/j2se/1.4/docs/guide/standards/.)
Since the packages contained in the
jaxp-api.jar file are not
endorsed standards (and cannot be placed in the endorsed standards directory),
they exist in a separate jar file.
The JAR files that define the SAX and DOM API classes used by the parsers and transformation engines are:
The Apache API jar file also contains Apache-specific APIs. These are not present in the JAXP release, as they are not integral to the Java APIs for XML Processing (JAXP).
If you upgrade to a version of the parser that uses a different version of those APIs, you would need to replace the JAR file containing the appropriate API. For more information on those APIs, see:
The remaining JAR file defines the JAXP factory classes and transform APIs:
As of version 1.4, those classes are built into the Java 2 platform. Because they are high-level wrapper classes that are not subject to change, it is not necessary to do anything with that JAR file when using Java 1.4. For earlier versions of the Java 2 platform, it always accompanies the other JAR files.
This section tells you what to do with the JAR files, depending on the configuration in which they are being used. The relevant variables are:
Again, if you are using the Java WSDP installation process to do the update, then you don't have to worry about the updates. But if you are updating individual jar files, copy them to
First, be sure to remove xerces.jar from
The reason for that step is that xerces.jar contains earlier Xerces implementations which will interfere with the operation of JAXP 1.2.
The next step depends on which version of the Java 2 SDK you are using:
Version 1.4 of the Java 2 platform has a JAXP 1.1 implementation built in. (JAXP 1.1 has a smaller application footprint, but JAXP 1.2 implements XML Schema and the transform compiler, XSLTC.) Because the built-in libraries are accessed before any classpath entries, you can only access the updated libraries by using the Java platform's Endorsed Standards mechanism.
There are two ways to use the endorsed standards mechanism. The first way is to copy all of the jar files except jaxp-api.jar into
The jaxp-api.jar file should not be copied, because it contains high-level factory APIs that are not subject to change.
Alternatively, you can use the java.endorsed.dirs system property to dynamically add those jar files to the JVM when you start your program. Using that system property gives you flexibility of using different implementations for different applications. You specify that property using
Finally, although the endorsed directory mechanism guarantees that the specified jars will be searched before the internal classes in the VM (which are searched before the classpath), the order in which the jar files are searched is indeterminate. For that reason, there should be no overlaps in the classes specified using that property. For more information, see the Endorsed Standards documentation for the 1.4 version of the Java platform.