ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: javac with different Java compilers.
Date Wed, 19 Dec 2001 17:11:05 GMT
--- detlef.brendle@canoo.com wrote:
> using the suggested fork parameter instead of 'true' doesnt do any good
> to me.
> if I specify a location where there is no javac such as 
> fork="c:/develop/java/jdk1.3.1/imaginary/javac"
> it still uses 'some' other javac compiler instead.
> I need to find out where it gets the location from.

I don't think you'd need to fork and run a different 'javac' -- I think
all you need to do is what I suggested before, which is to get rid of all
the classpath that <javac> would ordinarily pass (except including your
"destdir") and supply your own classpath for the JDK version you need at
that point. For example, I run 'ant' with JDK1.3, but if I wanted to
compile against just the 1.1.8 classes, I'd use something like:

  <target name="compile118">
    <javac
      includeJavaRuntime="no"
      includeAntRuntime="no"
      bootclasspath="${nowhere}"
      srcdir="${basedir}"
      destdir="${outdir}"
      includes="Test.java">
      <classpath>
        <pathelement location="${jdk118}/classes.zip"/>
      </classpath>
    </javac>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message