Hi folks, OK, I implemented an extension to Ant's default javac task, and modified Xerces build scripts to use it. So now Xerces compiles happily under unmodified versions of IBM JDK 1.4. The fix should be transparent for all other JDK's.
There's no reason the same code shouldn't work for Xalan--although I haven't tried since it would require some tweaking of Xalan's Ant scripts. If anyone's interested in pursuing this, I'd be happy to send you the code (or you can find it in the tools/src directory under xml-xerces/java.) Hope this is helpful to somebody, and thanks again to all who provided suggestions on how to approach the general problem. Cheers! Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] ----- Forwarded by Neil Graham/Toronto/IBM on 09/27/2002 06:47 PM ----- |---------+----------------------------> | | Neil Graham | | | | | | 09/26/2002 12:01 | | | PM | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: Gopal Sharma <[EMAIL PROTECTED]> | | cc: [EMAIL PROTECTED] | | From: Neil Graham/Toronto/IBM@IBMCA | | Subject: Re: can Xalan be compiled under JDK 1.4.x?(Document link: Neil Graham) | | | | | | | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| Hi Gopal, Thanks for the suggestions; they both do indeed work. But this still doesn't seem to be a very good situation: To compile a modern version of Xalan, I first need a compiled version of modern Xalan. i.e., as soon as I make a change which would be incompatible with the current Xalan jar I'm using on the bootclasspath or as the target of the java.endorsed.dirs property, I've got to use an older JDK to build a new jar. Then I can return to 1.4.x and use this new jar for additional compilations/tests. Because of the way Sun JDK's are packaged--with everything including Xalan and the kitchen sink in rt.jar--I've come to the conclusion that no good solution exists on this platform. In JDK's that are packaged with different components in different jars, it'll be possible to exclude the appropriate jars from javac's bootclasspath so that it will be possible to dynamically build entirely new Xerces/Xalan jars without reference to pre-existing ones. It's just unfortunate that Sun JDK's aren't packaged differently. Can anyone else see any workaround? Anybody know whether this is how Sun JDK's will always be packaged? Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] |---------+----------------------------> | | Gopal Sharma | | | <Gopal.Sharma@Sun| | | .COM> | | | | | | 09/26/2002 10:55 | | | AM | | | Please respond to| | | Gopal Sharma | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED], Neil Graham/Toronto/IBM@IBMCA | | cc: [EMAIL PROTECTED] | | Subject: Re: can Xalan be compiled under JDK 1.4.x? | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| Gopal Sharma wrote:- | The solution, I found is -- change the sequence of class loading using | bootclasspath means use: | | % javac -bootclasspath | $L_HOME/xalan.jar:$L_HOME/xsltc.jar:$JAVA_HOME/jre/lib/rt.jar | -J-showversion -verbose src/org/apache/xalan/templates/FuncKey.java | | It works in both Sun Jdk 1.4 and 1.4.1. I don't know why it didn't work earlier for me. But anyway, It works: Drop new xalan.jar/xsltc.jar in jre/lib/endorsed and simply use followiing: % javac -J-showversion -verbose src/org/apache/xalan/templates/FuncKey.java It will work great. Thanks - Gopal