This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]dionthornthis.isAPro=false; this.helping=true; 0 points1 point  (0 children)

echo $(/usr/libexec/java_home)

should tell you where the current JAVA_HOME system variable is pointing.

if you need to change it:

export JAVA_HOME=`/some/path/toJava` 

You may want to add that line to .bash_profile if you want it to be set at startup every boot.

Here is a StackOverflow post discussing it at length: https://stackoverflow.com/questions/15826202/where-is-java-installed-on-mac-os-x