Neil,
 
 I have found another solution to your problem (see attached) which worked
 for me. Hope this help.

 Cheers
 - Gopal

[EMAIL PROTECTED] wrote:-
| 
| Hi Todd, Gopal, Morris and all,
| 
| I've now tried using the endorsed standards mechanism (both using the
| -extdirs option to javac and by setting the java.endorsed.dirs system
| property).  No luck.  So I eviscerated the rt.jar file shipped with Sun
| 1.4.1 by whacking all org.apache classes, and *that* does work.
| 
| But that isn't an acceptable solution from my standpoint.  As background,
| my standpoint is that of a Xerces developer who wants Xerces to be
| buildable on any JDK; Xerces is now being shipped in IBM versions of 1.4,
| so we've finally run into this problem.
| 
| I guess my next step will be to try and throw together a custom Ant task
| that overrides javac's bootstrap in just the right way, in a
| vendor-dependent manner.  Is this really the only choice--surely somebody
| in the Xalan community must have licked this problem already, since Xalan's
| been shipped in JDK's for so long now..???
| 
| As always, all ideas much appreciated!
| 
| Cheers,
| Neil
| Neil Graham
| XML Parser Development
| IBM Toronto Lab
| Phone:  905-413-3519, T/L 969-3519
| E-mail:  [EMAIL PROTECTED]
| 
| 
| 
| 
| |---------+---------------------------->
| |         |           "G. Todd Miller -|
| |         |           XML Tech Ctr -   |
| |         |           Development"     |
| |         |           <Glenn.Miller@Sun|
| |         |           .COM>            |
| |         |                            |
| |         |           09/25/2002 09:26 |
| |         |           AM               |
| |         |           Please respond to|
| |         |           "G. Todd Miller -|
| |         |           XML Tech Ctr -   |
| |         |           Development"     |
| |         |                            |
| |---------+---------------------------->
|   
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
|   |                                                                            
                                                                 |
|   |       To:       [EMAIL PROTECTED]                                   
                                                                 |
|   |       cc:       Neil Graham/Toronto/IBM@IBMCA                              
                                                                 |
|   |       Subject:  Re: can Xalan be compiled under JDK 1.4.x?                 
                                                                 |
|   |                                                                            
                                                                 |
|   |                                                                            
                                                                 |
|   
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
| 
| 
| 
| 
| 
| Hi Neil,
| 
| Have you tried to put 'modern' version of Xalan in  your jre/lib/endorsed
| directory under the JDK1.4.x directory?  Not sure if this is the problem
| but I would give it a try.
| 
| Thanks,
| Todd
| 
| 
|              >>Mailing-List: contact [EMAIL PROTECTED]; run by
| ezmlm
|              >>list-help: <mailto:[EMAIL PROTECTED]>
|              >>list-unsubscribe: <
| mailto:[EMAIL PROTECTED]>
|              >>list-post: <mailto:[EMAIL PROTECTED]>
|              >>Delivered-To: mailing list [EMAIL PROTECTED]
|              >>Subject: can Xalan be compiled under JDK 1.4.x?
|              >>To: [EMAIL PROTECTED]
|              >>From: [EMAIL PROTECTED]
|              >>X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release
| 5.0.9a
| |January 7, 2002) at 09/24/2002 11:25:40 PM
|              >>MIME-Version: 1.0
|              >>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
|              >>
|              >>Hi all,
|              >>
|              >>I've looked around the list archives a bit, but can't
| readily find an
|              >>answer to this.  Is there a reliable way to get modern
| versions of
| Xalan to
|              >>compile under JDK 1.4.x?
|              >>
|              >>The only way I've found so far is to carefully set javac's
| bootclasspath to
|              >>include all jars important to the JDK but exclude the jar
| containing
| Xalan;
|              >>but since jars are laid out in a vendor-dependent way, it's
| not
|              >>obvious to me that it would be easy to code a clean and
| portable
| solution
|              >>on these lines.  I've also played with things like this:
|              >>
|              >>      javac -J-Xbootclasspath/p:modern_xalan_dir
| modern_xalan_files
|              >>
|              >>but this still doesn't seem to permit classes to be
| prepended to the
|              >>cootclasspath that javac's using.
|              >>
|              >>Any ideas greatly appreciated!
|              >>
|              >>Thanks,
|              >>Neil
|              >>Neil Graham
|              >>XML Parser Development
|              >>IBM Toronto Lab
|              >>Phone:  905-413-3519, T/L 969-3519
|              >>E-mail:  [EMAIL PROTECTED]
|              >>
| 
| =======================================================================
| G. Todd Miller                        Sun Microsystems Computer Company
| Software Systems Engineer             2 Network Drive, MS UBUR02-201
| GE&IS XML Tech Center                 Burlington, MA 01803-0903
|                                       781 442-0176
|                                       781 442-1437 (fax)
|                                       [EMAIL PROTECTED]
| 
| 
| 
| 
--- Begin Message ---
[EMAIL PROTECTED] wrote:-
| 
| Hi Gopal,
| 
| I have tried two variations on that theme:
| 
|       javac -extdirs d:\xml-xalan\java\build\xalan.jar
| src\org\apache\xalan\templates\FuncKey.java
| 
| where xalan.jar is a prebuilt modern Xalan binary; and
| 
|       javac -extdirs d:\xml-xalan\java\src
| src\org\apache\xalan\templates\FuncKey.java
| 
| Both gave me 56 compilation errors under Sun JDK 1.4.1.  :(
| 
| As a slight aside, I recall hearing about a "bug" in Sun JDK 1.4.0 that
| permitted -extdirs to override what was in rt.jar.

  Hmm .. I didn't hear any suchthing. Could you provide me the bug # ?
  Yesterday i saw this result:-
  
  % javac -J-showversion -extdirs $L_HOME -verbose TestTransformation.java
java version "1.4.0_00"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_00-b05)
Java HotSpot(TM) Client VM (build 1.4.0_00-b05, mixed mode)

[parsing started TestTransformation.java]
[parsing completed 462ms]
[loading /usr/j2se/jre/lib/rt.jar(javax/xml/transform/TransformerFactory.class)]
[loading /usr/j2se/jre/lib/rt.jar(javax/xml/transform/Transformer.class)]
[loading 
/usr/j2se/jre/lib/rt.jar(javax/xml/transform/TransformerException.class)]
[loading 
/home/Xalan/xml-xalan/java/build/xalan.jar(org/apache/xalan/Version.class)]
[loading 
/home/Xalan/xml-xalan/java/build/xsltc.jar(org/apache/xalan/xsltc/trax/XSLTCSour
ce.class)]
[loading /usr/j2se/jre/lib/rt.jar(java/lang/Object.class)]

 As you see above, it is loading javax.* files from rt.jar and Version from
 new xalan.jar. This is what confused me as i thought Version class was there
 in rt.jar. 
 
 -extdirs is working properly and it's not overriding the classes
 either in 1.4.0 or 1.4.1.

 Yep, -extdirs won't work.
 
 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. 

 Thanks
 - Gopal
  

| I haven't tried with
| the version of 1.4.0 (1.4.01 to be exact) that I have, nor can I recall
| exactly where I got that impression from.
| 
| Anyway, since the behaviour appears to fail on 1.4.1 this wouldn't seem to
| bde a general solution.
| 
| 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/25/2002 06:51 |
| |         |           AM               |
| |         |           Please respond to|
| |         |           xalan-dev        |
| |         |                            |
| |---------+---------------------------->
|   
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
|   |                                                                            
                                                                 |
|   |       To:       [EMAIL PROTECTED]                                   
                                                                 |
|   |       cc:                                                                  
                                                                 |
|   |       Subject:  Re: can Xalan be compiled under JDK 1.4.x?                 
                                                                 |
|   |                                                                            
                                                                 |
|   |                                                                            
                                                                 |
|   
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
| 
| 
| 
|  Have you tried javac -extdirs <dir> <files> ? In this case, javax.xml.*
|  classes are loaded from rt.jar and rest from <dir>\xalan.jar.
| 
|  HTH
|  - Gopal
| 
| 
| [EMAIL PROTECTED] wrote:-
| |
| | Hi all,
| |
| | I've looked around the list archives a bit, but can't readily find an
| | answer to this.  Is there a reliable way to get modern versions of Xalan
| to
| | compile under JDK 1.4.x?
| |
| | The only way I've found so far is to carefully set javac's bootclasspath
| to
| | include all jars important to the JDK but exclude the jar containing
| Xalan;
| | but since jars are laid out in a vendor-dependent way, it's not
| | obvious to me that it would be easy to code a clean and portable solution
| | on these lines.  I've also played with things like this:
| |
| |       javac -J-Xbootclasspath/p:modern_xalan_dir modern_xalan_files
| |
| | but this still doesn't seem to permit classes to be prepended to the
| | cootclasspath that javac's using.
| |
| | Any ideas greatly appreciated!
| |
| | Thanks,
| | Neil
| | Neil Graham
| | XML Parser Development
| | IBM Toronto Lab
| | Phone:  905-413-3519, T/L 969-3519
| | E-mail:  [EMAIL PROTECTED]
| |
| |
| 
| 
| 
| 

--- End Message ---

Reply via email to