Mac OS Java Home

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
Now in Oracle's website can download to Mac JDK. But after installation, for those who are not particularly familiar to Mac OS students, how to correctly set Java Home is a small problem.
In Mac OSX 10.5 and later in the system, the output Apple I suggest you use /usr/libexec/java_home as a Java Home. You can add in ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)

If the system is older, we can set the JDK installation directory for Java Home
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Daniel at December 22, 2013 - 2:16 PM