You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pito Salas <pi...@eroom.com> on 2002/11/08 14:12:37 UTC

Using Java 1.4 with Ant

I am having trouble convincing Ant to use Java 1.4 as the compiler for javac
tasks. If I set build.compiler to modern or javac1.4 it still always picks
Javac 1.3. Note that I have both 1.3 and 1.4 on my path. Does it simply pick
the first one it sees?

Also note that I'm running under Jbuilder 7, which runs under 1.3. Would the
"modern" setting look for 1.4 if it was able to locate both a 1.3 and a 1.4?

- Pito
-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Sunday, November 03, 2002 2:35 PM
To: Ant Users List
Subject: RE: Ant and Java 1.4 - resend with typo corrected



Do you have a system variable named JAVA_HOME set?  Where does it point 
to?  Do you have JAVA_HOME/bin in your system PATH?

Jake

At 11:34 AM 11/3/2002 -0500, you wrote:
>I am having trouble convincing Ant to use Java 1.4 as the compiler for
>javac tasks.
>
>If I set build.compiler to either modern or javac1.4 it always picks
>Javac 1.3.
>
>Can anyone point me in the right direction?
>
>Thanks
>
>Pito

Re: Using Java 1.4 with Ant

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 8 Nov 2002, Pito Salas <pi...@eroom.com> wrote:

> If I set build.compiler to modern or javac1.4 it still always picks
> Javac 1.3. Note that I have both 1.3 and 1.4 on my path. Does it
> simply pick the first one it sees?

The first one from your CLASSPATH, yes - unless you set fork to true,
in which case you can use the executable attribute to point to the
javac of JDK 1.4.

> Would the "modern" setting look for 1.4 if it was able to locate
> both a 1.3 and a 1.4?

There is no way (for Ant) to tell the 1.4 javac from the 1.3 one.  It
simply loads and runs com.sun.tools.javac.Main.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>