Okay, I\'m using Ant version 1.7.1 (default install) on CentOS 6.3:
[theuser@dev-ingyhere ~]$ ant -version
Apache Ant version 1.7.1 compiled on August 24 20
Really a JVM internals question
Since Ant is just echoing the java.lang.System properties (see comment above under original post), this is really a JVM question. The Java HotSpot Virtual Machine is the core interpreter. Code is available online at hg.openjdk.java.net.
On line 309 of the C++ code for HotSpot (os_linux.cpp) there is a an init_system_properties_values()
method in the os
class. It does some mild heuristics to kind of sniff out the location for a variable named home_path
which ends up being set to what Java users see as "java.home". Comments in the code indicate that '