This morning I decided to upgrade to the Macbook to the latest and greatest Java version from Oracle.
I downloaded jdk-8u25-macosx-x64.dmg from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
After the installation (which doesn’t mention any paths) it links to this: http://docs.oracle.com/javase/8/
(Double check to make sure I really installed a JDK and not just the runtime environment? The filename looks right…)
So, where is it?
$ java -version still reports 1.6, but that’s because I have
JAVA_HOME set in .bash_profile and on the PATH.
$ echo $JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
But the new one isn’t there under Versions:
$ ls /System/Library/Frameworks/JavaVM.framework/Versions/ 1.4 1.5 1.6 A CurrentJDK 1.4.2 1.5.0 1.6.0 Current
Ah ha! The Uninstall instructions on …/guides/install/mac_jdk.html tell us to delete
and there it is:
$ ls /Library/Java/JavaVirtualMachines/ jdk1.8.0_25.jdk
After looking around a bit, our new line for
and it works!
$ java -version java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) $ javac -version javac 1.8.0_25
(Remember to open a new terminal window or otherwise reload ~/.bash_profile after making changes.)