You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ben Stover <bx...@yahoo.co.uk> on 2010/07/27 17:02:06 UTC

How to the currently used java version and java install path?

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


Re: How to the currently used java version and java install path?

Posted by David Weintraub <qa...@gmail.com>.
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 <bx...@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


Re: How to the currently used java version and java install path?

Posted by Leif Ershag <le...@ershag.se>.
Some of these should give the correct value:
http://www.ghidinelli.com/2008/04/01/built-in-ant-properties

On Tue, Jul 27, 2010 at 5:02 PM, Ben Stover <bx...@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
>
>