My understanding is that I could use the latest Xerces installation from Apache together with Sun's
j2sdk1.4.2_04 by taking advantage of the "endorsed" mechanism provided by the J2SE platform. That is,
I should be able to throw the latest Apache's Xerces implementation into the %JAVA_HOME%\jre\lib\endorsed directory to use that JAXP version instead of the original one which
comes with the j2sdk1.4.2_04.
I'm not able to get the jdk's automatic "endorsed" mechanism to work correctly though. That is, when I
unzip the Xerces download from the apache site in my %Java_HOME%\jre\lib\endorsed directory, things
do not work as expected with my application. (I've created the "endorsed" directory myself).
OTOH, when I use the command line option (java -D"java.endorsed.dirs=C:\xerces-2_6_2" ...), everything
works fine. But that's not what I want, I would rather like to add Xerces to the jdk installation in order
to not have to rely on command-line property passing.
I've been looking way too long into this now -- including browsing the web :).
Any ideas very appreciated.
Following up on my own message.
After some more investigation, I think the jdk's endorsed mechanism works fine if the
to-be-endorsed jar files are placed in the j2sdk1.4.2_04\jre\lib\endorsed directory
^^^ and the java.exe from the j2sdk1.4.2_04\jre\bin is actually used.
According to http://java.sun.com/j2se/1.4.2/docs/guide/standards/ the same should be achievable
if the to-be-endorsed jar files are placed in the j2sdk1.4.2_04\lib\endorsed (above the jre directory)
directory and the java.exe from the j2sdk1.4.2_04\bin directory is used (sort of the default in my
Unfortunately, I don't see #2 working.
I figured it out, I have several versions of java (SUN, JRockit, 1.4.2, 1.5, etc.) on my PC, and also you have to quite internet explorer and/or firefox so the java plugin is reinitialized..
hope that helps someone who stumbles upon this post. ;)