develop with

Set Java home on a mac

To get location of JAVA_HOME run:

/usr/libexec/java_home -v 1.8

Pass in the version you want, for instance 1.7, 1.8, etc…

To set JAVA_HOME environment variable run:

export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"

Check out the discussion on Stackoverflow

comments powered by Disqus

Want to see a topic covered? create a suggestion

Get more developer references and books in the developwith store.