> ls -l /usr/libexec/java_home lrwxr-xr-x 1 root wheel 79 Apr 7 17:03 /usr/libexec/java_home -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home
> /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
And then you can set JAVA_HOME variable in /etc/profile file as following:
> export JAVA_HOME=$(/usr/libexec/java_home)
No comments:
Post a Comment