xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject Re: xalan.jar and JDK 1.4
Date Mon, 24 May 2004 21:58:37 GMT
On Tue, 2004-05-25 at 00:53, Marco wrote:
> Xalan FAQs say that	
> "The Sun JDK 1.4 is packaged with an old version (2.2D11) of Xalan-Java. 
> The JDK 1.4 will attempt to use this version instead of any on the 
> classpath. Unfortunately, this causes problems when attempting to use a 
> newer version of Xalan-Java with the Sun JDK 1.4."
> And possible solutions are:
> - use the Endorsed Standards Override Mechanism (place the xalan.jar, 
> xercesImpl.jar, and xml-apis.jar in the <java-home>\lib\endorsed directory)
> - use the -Xbootclasspath java commandline option to prepend the new 
> xalan.jar, xercesImpl.jar, and xml-apis.jar to the boot class path.
> But, if I distribute my application as a jar file, I can only include 
> the xalan/xerces jars (distributed with the app) in the class path 
> (using the Class-Path property in the manifest file). How could I 
> override the user preinstalled (old) xalan jar?

There is an additional override mechanism available in Java (documented
in the standard java 1.4 docs). If you pass this option to the JVM on
then any jars in directory "overrides" take precedence over classes in
the java distribution. I use this very successfully in my application

Note however that if you need to support both java1.3 and java1.4, then
you need to ensure that for java1.3, the xalan/xerces jars are in the
classpath in the normal manner, while for java1.4 they are in a
directory that the -Djava.endorsed.dirs can point to. Of course for java
1.3, the -Djava.endorsed.dirs option is simply ignored by the JVM, which
helps simplify things a little.

Xalan team: perhaps this info could be put in the FAQ?



View raw message