Install Java 7 on OSX

If you currently have your JAVA_HOME environment variable set as the trusty:

export JAVA_HOME=/Library/Java/Home

then when you upgrade to Lion you will need to adjust it, as the install location has changed. The new environment variable should be:

export JAVA_HOME=$(/usr/libexec/java_home)

This is actually a command which (in true OS X Java fashion) is a symlink to another command that outputs the true location of Java.

 

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