java - Where is JAVA_HOME on OSX Sierra (10.12), El Capitan (10.11), Yosemite (10.10), Mavericks (10.9), Mountain Lion (10.8) or OSX Lion (10.7)? -
java optional package on latest versions of osx.
yet once installed appears java_home environment variable not set properly.
with java optional package or oracle jdk installed, adding 1 of following lines ~/.bash_profile file set environment variable accordingly.
export java_home="$(/usr/libexec/java_home -v 1.6)" or export java_home="$(/usr/libexec/java_home -v 1.7)" or export java_home="$(/usr/libexec/java_home -v 1.8)"
update: added -v flag based on jilles van gurp response.
Comments
Post a Comment