Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAVA_HOME does not point to the JDK #3

Open
rainyear opened this issue Feb 4, 2015 · 0 comments
Open

JAVA_HOME does not point to the JDK #3

rainyear opened this issue Feb 4, 2015 · 0 comments
Assignees

Comments

@rainyear
Copy link
Owner

rainyear commented Feb 4, 2015

Android studio 要 >= JDK 1.7,升级之后,Cordova run 出错:

/Applications/ADT/sdk/tools/ant/build.xml:601: The following error occurred while executing this line:
/Applications/ADT/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Applications/ADT/sdk/tools/ant/build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre"

找半天没有找到解决方法,只好将环境变量 JAVA_HOME 先设置回 1.6,参考:
How To Set $JAVA_HOME Environment Variable On Mac OS X

# edit ~/.bash_profile && add or edit
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant