java - Running gradle -v returns "JAVA_HOME is set to an invalid directory" even though I have a valid JAVA_HOME -
i'm trying install , use gradle 2.7
i have java installed properly:
java -version java version "1.8.0_11" java(tm) se runtime environment (build 1.8.0_11-b12) java hotspot(tm) 64-bit server vm (build 25.11-b03, mixed mode)
i have java_home set correctly:
echo $java_home /library/java/javavirtualmachines/jdk1.8.0_11.jdk/contents/home
when run gradle -v:
error: java_home set invalid directory: /library/java/javavirtualmachines/jdk1.8.0_11.jdk/contents/home please set java_home variable in environment match location of java installation.
i tried use solution given here gradle not recognize java_home have set , here gradle finds wrong java_home though it's correctly set
but line not exist in gradle file located @ /usr/local/gradle/gradle-2.7/bin
does have other suggestions?
edit: cat ~/.bash_profile
export java_home=$(/usr/libexec/java_home) export jdk_home=$(/usr/libexec/java_home) export path=/users/eghdk/dev/android/sdk/platform-tools:/users/eghdk/dev/android/sdk/tools:$path export android_home=/users/eghdk/dev/android/sdk # adding gradle system path export gradle_home=/usr/local/gradle/gradle-2.7 path=$gradle_home/bin:$path export path # turning on gradle daemon default export gradle_opts="-dorg.gradle.daemon=true"
Comments
Post a Comment