You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by IndianAtTech <in...@gmail.com> on 2005/03/14 13:16:11 UTC

how can we find which jre home is in use by ant script?

Hi All,

how can we find which jre home is in use by ant script?

Thanks
Sudhakar

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


Re: how can we find which jre home is in use by ant script?

Posted by James Fuller <ji...@ruminate.co.uk>.
IndianAtTech wrote:

>Hi All,
>
>how can we find which jre home is in use by ant script?
>
>Thanks
>Sudhakar
>  
>

you could print out the following java property to detect JVM in current usage as well

ant.java.version    the JVM version Ant detected; currently it can hold
                    the values "1.1", "1.2", "1.3" and "1.4".
or

java.home

put <echo message="java home=${java.home}"/> in a test target and run it...see what it prints!

remember you can always access all env variables by using property to 
load up env vars

  <property environment="env"/>

will mean that you can refer to all env vars ala ${env.PATH} will give 
you system PATH and so on....

normally if you are not fiddling with Ant's own run script then  JAVACMD 
- full path of the Java executable, is used. Redefine this if you want 
to invoke a different JVM than JAVA_HOME/bin/java(.exe). You will find 
it in Ant's own run wrapper.

gl, Jim Fuller

note: that if you just have the JRE available many of Ant Tasks wont 
work, they require full JDK.


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


Re: how can we find which jre home is in use by ant script?

Posted by Ronen Mashal <ro...@jacada.com>.
<echo>${java.home}</echo>

Ronen.


IndianAtTech <in...@gmail.com> wrote on 03/14/2005 02:16:11 PM:

> Hi All,
>
> how can we find which jre home is in use by ant script?
>
> Thanks
> Sudhakar
>
> ---------------------------------------------------------------------
> 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