I am running OS X Yosemite. I add Java to my path in .bashrc
like this:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export PATH=$JAVA_HOME/bin:$PATH
/user/libexec/java_home -v 1.8
points me to /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home
.
This sets my "default" JDK to be 1.8.0_74. I'm not sure where this JDK came from. I think it shipped with Yosemite.
Separately, Java Updater runs periodically and updates Java. Currently it says I am on 1.8.0_161:
But I can't find it on my computer anywhere! It's not inside /Library/Java/JavaVirtualMachines/
. I tried find / -name java -type f
and still couldn't find it. Where is it?
pkgutil --pkgs | egrep -i 'oracle|java|jdk|jre'
show any relevant packages installed?pkgutil
existed. The output is (sorry all one line):com.apple.pkg.JavaEssentials com.apple.pkg.JavaForMacOSX107 com.apple.pkg.JavaMDNS com.apple.pkg.JavaSecurity com.apple.pkg.JavaTools com.oracle.jdk7u67 com.oracle.jdk8u25 com.oracle.jdk8u74 com.oracle.jre
com.oracle.jdk7u67 com.oracle.jdk8u25 com.oracle.jdk8u74
are the ones in/Library/Java/JavaVirtualMachines/
--files
againstcom.oracle.jre
shows some files that suggest it's 1.8.0_161 (the desired version), and running it with| grep bin
showsjava
exists inContents/Home/bin/java
. Trying to figure out where that is./Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/
)