title: Running Ant with JDK 1.6 on Mac OS X
body: <p>I am having a problem running Ant with JDK 1.6 on Mac OS X. Even though Java application versions is set to Java SE 6 in OS X's Java Preference, executing <code>java -version</code> in Terminal also shows <code>java version "1.6.0_07"</code>, Ant still seems to use JDK 1.5 to be using JDK 1.5 as it does not see JDK 1.6 classes when compiling my code.</p>
  
  <p>I understand that Ant relies on <code>JAVA_HOME</code> environment variable to specify which JDK to use. However, I do not quite understand how this variable can be set on Mac OS X.</p>
  
  <p>Hence, my question is how to make Ant runs with JDK 1.6 on Mac OS X. If the correct way is still to set <code>JAVA_HOME</code> environment variable, how to set the variable on OS X.</p>