Thanks for clearing that up.
I'm sticking with ${java.specification.version} as suggested by Alexey.
Zarar
- Original Message -
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To:
Sent: Thursday, June 16, 2005 3:00 AM
Subject: Re: Detecting JDK Version using ANT
Zarar Siddiqi wrote:
Hi,
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 metho
On Wed, 15 Jun 2005, Zarar Siddiqi <[EMAIL PROTECTED]> wrote:
> I'm assuming ${ant.java.version} is the version Ant is using in case
> there are multiple JDK's installed
No, it is the "flavor" of JDK Ant has detected at runtime, it doesn't
trust the system properties and probes for certain featur
Actually the best property is ${java.specification.version} it is just
two digit version 1.4 or 1.5.
- Alexey.
Ivan Ivanov wrote:
Hello,
you can try with java.version property:
$${java.version} is ${java.version}
$${java.runtime.version} is
${java.runtime.version}
Regar
Java sets ${java.vm.version} property with its version.
- Alexey.
Zarar Siddiqi wrote:
Hi,
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
able.
Am I correct?
Thanks again.
- Original Message -
From: "Ivan Ivanov" <[EMAIL PROTECTED]>
To: "Ant Users List"
Sent: Wednesday, June 15, 2005 4:06 PM
Subject: Re: Detecting JDK Version using ANT
Hello,
you can try with java.version property:
java version: ${ant.java.version}
>-Original Message-
>From: Zarar Siddiqi [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 15, 2005 9:49 PM
>To: user@ant.apache.org
>Subject: Detecting JDK Version using ANT
>
>Hi,
>
>Is there
Hello,
you can try with java.version property:
$${java.version} is ${java.version}
$${java.runtime.version} is
${java.runtime.version}
Regards
Ivan
--- Zarar Siddiqi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there a clean way to detect what version of Java
> is being used w
Hi,
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.