ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Azariah Jeyakumar" <azariah.jeyaku...@tumbleweed.com>
Subject RE: using different JDK version for javac than ant
Date Sat, 15 Sep 2001 00:59:38 GMT
(Sorry for the earlier empty message)

Hi,

I noticed that the javac task of ant does not use the javac.exe command but
rather uses the com.sun.tools.javac.Main class to compile the sources (when
build.compiler="modern" is used). 

Since the com.sun.tools.javac.Main class comes from the tools.jar, as long
as we set the classpath to point to the tools.jar and rt.jar of the required
JDK version, (and the right build.compiler setting) we dont have to bother
which JDK version ant itself is running on. Is my theory correct?

Thanks
Azariah

> -----Original Message-----
> From: Azariah Jeyakumar 
> Sent: Thursday, September 13, 2001 7:11 PM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: using different JDK version for javac than ant
> 
> 
> Hi,
> 
> Thanks, it works! I was able to compile my code that used JDK 
> 1.3 classes when running ant using JDK 1.2.
> 
> But I am surprised that it works!
> 
> Because I did not give the JAVA_HOME of where my 1.3 was 
> installed and hence ant has no way to get to the javac of my 
> 1.3 installation.
> 
> Does ant use the javac of 1.2 with the rt.jar of 1.3? Will 
> this work if I had used any keywords that were introduced in 
> 1.3? (I cant remember that any keywords were introduced in 
> JDK 1.3 but I think some were introduced in JDK 1.4)
> 
> Thanks
> Azariah
> 
> > -----Original Message-----
> > From: Diane Holt [mailto:holtdl@yahoo.com]
> > Sent: Thursday, September 13, 2001 5:39 PM
> > To: ant-user@jakarta.apache.org
> > Subject: Re: using different JDK version for javac than ant
> > 
> > 
> > --- Azariah Jeyakumar <azariah.jeyakumar@tumbleweed.com> wrote:
> > > Is it possible to compile the sources (javac task) using 
> > JDK version 1.3
> > > when ant itself is running on JDK 1.2?
> > 
> > Yes -- set build.compiler="modern", includeJavaRuntime="no", 
> > and set the
> > classpath attribute (or nested <classpath> element) to the 
> > 1.3 jar(s) you
> > need.
> > 
> > Diane
> > 
> > =====
> > (holtdl@yahoo.com)
> > 
> > 
> > 
> > __________________________________________________
> > Terrorist Attacks on U.S. - How can you help?
> > Donate cash, emergency relief information
> > http://dailynews.yahoo.com/fc/US/Emergency_Information/
> > 
> 


Mime
View raw message