ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Holt" <jeff.h...@hotsos.com>
Subject RE: java task question for ant 1.6.5
Date Fri, 27 Oct 2006 20:52:36 GMT
The reason I don't want to use <apply> is that I have to qualify the
executable path. Otherwise, for some yet unknown reason, ant executes
/usr/bin/java rather than the one in the PATH. And, of course,
/usr/bin/java, is not appropriate.

I gave ${jre.home} a try and it didn't get resolved. I looked but didn't
see where I had to change anything else. I just assumed jre is a built
in property namespace. Bad assumption?

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Friday, October 27, 2006 3:24 PM
To: Ant Users List
Subject: Re: java task question for ant 1.6.5

On 10/27/06, Jeff Holt <jeff.holt@hotsos.com> wrote:
> To make my build script a bit less susceptible to environmental
errors,
> I'd like to rewrite the following task:
>
> <apply executable="${env.JAVA_HOME}/bin/java">

Simply replace ${env.JAVA_HOME} by ${jre.home}, and it will use the
same JRE or JDK used by Ant itself. <apply> is better than
<java>+<ac:for> in this case IMHO. Or you could also use
<ac:outofdate>, in which can you can avoid the fork done by apply.
--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message