ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Tyler" <>
Subject Re: Ant 1.4.1: Using javac fork=true and changing java.home
Date Fri, 19 Apr 2002 14:49:13 GMT

----- Original Message -----
From: "Diane Holt" <>

> --- Gordon Tyler <> wrote:
> > Running Ant1.4.1 with JDK 1.3.1_03.
> >
> > I'm trying to build parts of my project with JDK 1.3 and other parts
> > with 1.4.
> I thought the agreed upon approach (when this came up the other day) was
> to <exec> 'ant', passing JAVA_HOME via an <env>.

I tried this but it didn't work. I suspect it is because our main build
machine (and developers' machines) is Windows 2000 and the Windows API
CreateProcess call (as used by exec) doesn't know how to execute 'ant.cmd'.
Yes, I know could use 'cmd.exe' but that seems like too much of a hack. Also
this solution breaks the build into separate Ant executions which could have
weird effects on the build listeners that we use for mailing build results.

What I ended up doing was duplicating JavacExternal in our in-house Ant
addon classes and changing it to use java.home and the modern command line.
Then I added an additional param to the antcall, setting build.compiler to
use this class. This works well enough for the moment.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message