If I brew --config
, I see
#...
Java: 1.8.0_60
which is what my my OS X Java Control Panel reported until I recently updated. Now the control panel reports the new version
Java 8 Update 65
but brew --config
continues to report the old one.
Why do these two versions of Java differ? I haven't explicitly installed a different Java with Homebrew, and had always thought that Homebrew was reporting the version of he one Java I'm aware of: the one I installed when Java notified be of an update.
There is a difference between the Java Runtime Environment (JRE) and the Java Development Kit (JDK). You can have both installed and both can be at a different version. Brew will report the version of Java that is used on the command line.
The JRE is installed in: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/
The JDK is installed in: /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/
In my case the JDK was at update 20 while the JRE was at update 65. When you check for Java updates, the updater only updates the JRE. The JDK has to be manually updates apparently.