Thanks, Diane! You helped lead me to figuring it out for myself.

> you could probably do that with property files that get
> read in accordingly.
I do have to migrate toward property files, but this is the basic recipe I
was looking for:

1) Make sure the location of your Javac compiler classes are in the
classpath in which you invoke Ant!  Somebody went through the pain of
creating painless batch/shell commands for Ant in Ant's bin directory, but I
ignored them for my own nefarious reasons.
i.e.: C:/jdk1.3/lib/tools.jar

2) The Ant 1.3 <javac> target arguments includeAntRuntime/includeJavaRuntime
provide the magic.  For my situation, the default settings are correct,
especially includeJavaRuntime defaulted to "no" which allows me to pick the
Cross-Compilation of my choice.

3) I just have to be sure the correct classes.zip(jdk1.1.8) or
rt.jar(jdk1.2+) are a used for the <javac> target's bootclasspath that I
need.

4) And easy to forget, 'extdirs' needs to point to the 'extdirs' that belong
to the intended cross set of extentions.

Javac target example:
    <javac srcdir="${src}" destdir="${classes}"
           includes="**/*.java"
           excludes="**/examples/**,**/test/**"
           bootclasspath="C:/jdk1.1.8/lib/classes.zip"
           extdirs=""
           classpathref="project.class.path"
           optimize="on" debug="on"
           target="1.1"  deprecation="off"
           >
      </javac>

Does that compute?  Or have I missed something?

Kind Regards,
Greg Kedge

> -----Original Message-----
> From: Diane Holt [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 2:39 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Jikes; JDK1.3; JDK1.1.8 Project! Oh my!
>
>
> --- Greg Kedge <[EMAIL PROTECTED]> wrote:
>
> > Your environment is identical to the one in which I need to run. My Ant
> > 1.2 build files are set up to run using a classic compiler so as to
> > assure compilation against JDK 1.1.8 classes.zip alone. However, I have
> > used jikes on my own, overriding -Dbuild.compiler="jikes". But, I always
> > ran the risk of the class path including JDK 1.3 rt.jar. Supposedly 1.3
> > was going to give folks better control over the jar file selection at
> > compile time. Is there a reference you can site that would help me
> > transition from Ant 1.2->1.3 to deal with this mix environment(jikes,
> > Ant using 1.3, for projects that are delivered to run in 1.1.8 ONLY!)
> >
> > I'm looking for a strategy to start from and perhaps example <javac>
> > targets for such a situation.
>
> Pre-1.3, I had a modified Javac.java that turned off (hard-coded, in the
> source-file) adding the system run-time libs -- but with 1.3, things have
> been reworked to be much more flexible. In addition to being able to add
> functionality for other compilers much more easily, you also now have two
> new attributes, includeAntRuntime and includeJavaRuntime, that let you
> specify whether not only the system run-time but the Ant libs will be
> included in the classpath. If you specify these as "no", then include the
> 1.1.8 classes.zip file in the <classpath> you specify, you should be good
> to go (I'm guessing even if you do use 'javac' as your compiler, but I
> haven't tested that).
>
> Note that I didn't have <javac> tasks set up to be flexible about what
> classpath they used, since no flexiblity was allowed -- but if you're
> looking to compile the same source, using different combinations of
> compiler/classes, you could probably do that with property files that get
> read in accordingly.
>
> Diane
>
> =====
> ([EMAIL PROTECTED])
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>



__________________________________________________
Manage your Hotmail with ANY email application:
Get Pop3Hot at <http://pop3hot.com/main.htm>

Reply via email to