JAVA_HOME in MacOSX

CocosIDE打包APK报:
Error: JAVA_HOME is not defined correctly.
  We cannot execute /System/Library/Frameworks/JavaVM.framework/Home/bin/java


把ant脚本这一段删掉:
--- /opt/local/share/java/apache-ant/bin/ant.orig 2012-02-09 12:02:30.000000000 -0500
+++ /opt/local/share/java/apache-ant/bin/ant 2012-02-09 12:02:53.000000000 -0500
@@ -83,11 +83,7 @@
mingw=false;
case "`uname`" in
   CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
+  Darwin*) darwin=true ;;
   MINGW*) mingw=true ;;
esac

参考:
https://bz.apache.org/bugzilla/show_bug.cgi?id=52632

你可能感兴趣的:(JAVA_HOME in MacOSX)