ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: How to <echo> the currently used java version and java install path?
Date Tue, 27 Jul 2010 23:25:50 GMT
You can check the value of the ant.java.version property. This lists
the Java X.x version, but not the build number. You can also echo any
Java System Properties where are listed here: http://bit.ly/9K40eZ.
The one you want might be java.version.

<project>
    <echo>Java Version via Ant: ${ant.java.version}</echo>
    <echo>Java Version System Prop: ${java.version}</echo>
</project>

On Tue, Jul 27, 2010 at 11:02 AM, Ben Stover <bxstover@yahoo.co.uk> wrote:
> How can I dsiplay at the console the currently used Java release and the java installation
path?
>
> If possible I want to display the exact version including the update number e.g.
>
> 1.5.upd03
>
> Ben
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

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


Mime
View raw message