You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Jeffery, Myles" <mj...@lehman.COM> on 2000/12/01 09:34:16 UTC

How does the Javac task know where jdk/jikes is?

Hi,

How do I tell the javac task where the javac.exe of jikes.exe compilers are
located?  And how do I tell jikes where the appropriate rt.jar file is
located and how do I pass other parameters to it?  I am aware of the
build.compiler property but this does not explicitly tell the javac task
where the executables are located.

The javac task looks a little hit & miss.  I really want to be very explicit
about which jdk/jikes it uses and where the executable and core libraries
are located.  Should I use the exec task to get this much control?

Thanks,

Myles Jeffery

Re: How does the Javac task know where jdk/jikes is?

Posted by Stefan Bodewig <bo...@apache.org>.
Myles Jeffery <mj...@lehman.COM> wrote:

> Hi,
> 
> How do I tell the javac task where the javac.exe of jikes.exe
> compilers are located?

Talking about Jikes, Ant expects it to be in the PATH, same holds true
for Microsoft's jvc. It doesn't use javac.exe at all but calls the
compiler classes directly.

Right at the moment <javac> will always use the javac implementation
that matches the VM Ant is running in - and I doubt it would work if
you'd try to invoke the javac implementation of JDK 1.1 when running
in JDK 1.2.

When you set build.compiler to jikes, it will include the rt.jar or
classes.zip for the current JVM as well - this is determined by
setting the environment variable JAVA_HOME BTW - there are some
situations where this is not what you want and this might be changed
in the next release.

Stefan