Setting JAVA_HOME variable on Mac

$ edit ~/.profile

add line

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

SAVE

re-open Terminal

$ echo $JAVA_HOME
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

$

Please note that the most current version (1.6) is loading when 1.7 is missing.


As an Amazon Associate I earn from qualifying purchases.

No comments:

Post a Comment

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..