Under OS X EI Capitan, the Java version is too low to download the DMG file upgrade from Oracle website has been problematic,
I found three Java environments under Mac
#这应该是系统自带java环境, default/usr/bin/Java point here/system/library/frameworks/javavm.framework/versions/current/commands/Java # This should be the Java environment under the browser, Oracle official DMG seems to only update here/Library/Internet plug-ins/javaappletplugin.plugin/contents# as a solution, you can download the TAR package from Oracle Java and extract it to this directory/library/java/javavirtualmachines# Set the BASHRC file and end up as follows [[email protected]192versions]$Tail-N4/etc/bashrc_apple_terminal Java_home="/library/java/javavirtualmachines/jre1.8.0_74.jre/contents/home/"CLASSPATH="$JAVA _home/lib"PATH=.: $JAVA _home/bin: $PATH [[email protected]192versions]$ Java-Versionjava version"1.8.0_74"Java (TM) SE Runtime Environment (build1.8.0_74-b02) Java HotSpot (TM) --bit Server VM (build25.74-b02, Mixed mode) [[Email protected]192versions]$
Upgrading the Java version of your Mac