Trouble updating to Java 8 JDK I have run the JDK 1.8 installer from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, and it all apparently installed correctly. But in the terminal, when I do:

  javac -version


It still reports 1.6.0_65

What am I doing wrong?

I'm using Mavericks 10.9.4
What does your .bash_profile say? There should be a line:

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


You just have to change the Java version from 1.6 to 1.8 and then reload the system variables (. ~/.bash_profile). Tried this out changing between jdk7 and jdk6. So version 8 shouldn't be an exception.