KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 2010 [theuser@dev-ingyhere ~]$ cat /etc/*-release CentOS release 6.3 (Final) I have JAVA_HOME set and I run ant : [theuser@dev-ingyhere ~]$ export JAVA_HOME=/usr/java/jdk1.7.0_17 ; echo $JAVA_HOME ; /usr/java/jdk1.7.0_17 [theuser@dev-ingyhere ~]$ ant -diagnostics | grep java\\.home java.home : /usr/java/jdk1.7.0_17/jre This is even more fun: [theuser@dev-ingyhere ~]$ export JAVA_HOME=/a/fools/folly ; echo $JAVA_HOME ; ant -diagnostics | grep java\\.home /a/fools/folly java.home : /usr/java/jdk1.7.0_17/jre [theuser@dev-ingyhere ~]$ env | grep JAVA JAVA_HOME=/a/fools/folly So, I do get one thing -- apparently Oracle's Java 7 Javadoc for Class System is WRONG (aghast!) where it describes the java.home System Property as the "Java installation directory." I know that because the Java(TM) Tutorials for System Properties describes the java.home System Property as the "Installation directory for Java Runtime Environment (JRE)." In other words the JAVA_HOME in the environment does not necessarily equal java.home in the JVM System Properties. (What sets that?!) QUESTION: Where and how does Ant get/set the system property java.home ?
Tags (comma-separated)
Save Edits
Cancel