ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <>
Subject RE: Detecting JDK Version using ANT
Date Wed, 15 Jun 2005 20:01:37 GMT

<project name="test" default="check">
    <target name="check">
        <echo>java version: ${}</echo>       


>-----Original Message-----
>From: Zarar Siddiqi [] 
>Sent: Wednesday, June 15, 2005 9:49 PM
>Subject: Detecting JDK Version using ANT
>Is there a clean way to detect what version of Java is being 
>used when running a build file?
>Some possible solutions include:
>1) parsing the JAVA_HOME variable to detect the version number
>2) Checking the existence of a file which is specific to a version
>Both methods are somewhat brittle.
>Is there a sureshot way of knowing whether ANT is being 
>invoked using Java 1.5 or not?
>Thanks in advance,

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

View raw message