On 07/22/2013 01:31 PM, Soumava Ghosh wrote:
Thanks Andrew!

JAVA_HOME was the issue. It was not set, and I think that's why the
build was somehow defaulting to /Library/Java/Home which was a 1.6 JDK.
It should have
been /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home.
Setting JAVA_HOME to this path unblocked the build.

If I may ask, isn't the Java setup supposed to update the environment
variable?

It looks like its ant doing this. In ant 1.9.0's shell script wrapper, it'll use the OS's Java if JAVA_HOME isn't set (see below).

Blair


# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false;
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  Darwin*) darwin=true
           if [ -z "$JAVA_HOME" ] ; then
               if [ -x '/usr/libexec/java_home' ] ; then
                   JAVA_HOME=`/usr/libexec/java_home`
elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
               fi
           fi
           ;;
  MINGW*) mingw=true ;;
esac


Reply via email to