Ant 1.8.1 showing incorrect java version?
ant, java-7
Solution
I found this from Ant website. It's hardcoded actually.
ant.java.version the JVM version Ant detected; currently it can hold
the values "1.2", "1.3",
"1.4", "1.5" and "1.6".
After I update my Ant to 1.9.0, the issue is solved.
[echo] java.version = 1.7
[echo] java.home = C:\Program Files\Java\jdk1.7.0_17\jre
It's kind of funny. :)
Problem
I'm running Ant 1.8.1 under Win 7. And my Java version is 1.7_17. I add the following 2 lines in my build file for diagnosing. ``` <echo message="java.version = ${ant.java.version}" /> <echo message="java.home = ${java.home}" /> ``` And the result is ``` [echo] java.version = 1.6 [echo] java.home = C:\Program Files\Java\jre7 ``` Any idea on what's going on? Is it hardcoded in Ant 1.8.1 that the highest java version it can show is 1.6?