Re: Detecting JDK Version using ANT

2005-06-16 Thread Zarar Siddiqi
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

Re: Detecting JDK Version using ANT

2005-06-16 Thread Peter Reilly
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

Re: Detecting JDK Version using ANT

2005-06-16 Thread Stefan Bodewig
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

Re: Detecting JDK Version using ANT

2005-06-15 Thread Alexey N. Solofnenko
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

Re: Detecting JDK Version using ANT

2005-06-15 Thread Alexey N. Solofnenko
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

Re: Detecting JDK Version using ANT

2005-06-15 Thread Zarar Siddiqi
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:

RE: Detecting JDK Version using ANT

2005-06-15 Thread RADEMAKERS Tanguy
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

Re: Detecting JDK Version using ANT

2005-06-15 Thread Ivan Ivanov
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

Detecting JDK Version using ANT

2005-06-15 Thread Zarar Siddiqi
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.