How to install Java JDK on Mac OS X ( with JAVA_HOME )

Video is ready, Click Here to View ×


How to install Java JDK Java Development Kit on mac.
In Mac OSX 10.5 or later, Apple recommends to set the $JAVA_HOME variable to /usr/libexec/java_home, just export $JAVA_HOME in file ~/. bash_profile or ~/.profile.

$ vim .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home

JRE Installation for Mac OS X (64-bit). How to Set $JAVA_HOME environment variable on Mac OS…


25 thoughts on “How to install Java JDK on Mac OS X ( with JAVA_HOME )”

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*