ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Strollo <>
Subject Re: How to specify the location of the compiler ?
Date Tue, 13 Feb 2001 18:15:47 GMT

    Stefan> As far as I understand, Ant uses the PATH environment settings
    Stefan> to execute the compiler. Is there a possibility to define the
    Stefan> location of the compiler in the build or property file ?

I just got bit by that.  I set my JAVA_HOME to jdk 1.3.  I was a little
disappointed to see that the ant.bat file (I'm using Win2000) checked for
JAVA_HOME, but did not prepend JAVA_HOME/bin to the java command used to

I was building code that needed jdk 1.3, but it was using the java
executable of jdk1.2.2 (required to be in my PATH for another project).
Consequently, (I think), 1.2.2's rt.jar was part of the build rather than
1.3's rt.jar.

Anyway, I solved it by copying the ant/ant.bat file into my ~/bin directory and
modifying it to use JAVA_HOME prepended to the java command.  My ~/bin
comes before ant/bin in my path.

Larry Strollo                              

View raw message