The newly installed Mac system 10.10, JDK is 1.8, because some tools to use JDK 6, the following is the setup process
View version
Java-version
See Java again: in/usr/bin/java
Cd/usr/binls-all | grep javalrwxr-xr-x 1 root wheel 9 00:23 java-/system/library/frameworks/javavm.framework /versions/current/commands/javalrwxr-xr-x 1 root wheel 9 00:23 javac-/system/library/ Frameworks/javavm.framework/versions/current/commands/javaclrwxr-xr-x 1 root wheel 9 23 00:23 Javadoc-/system/library/frameworks/javavm.framework/versions/current/commands/javadoclrwxr-xr-x 1 root wheel 9 00:23 javah-/system/library/frameworks/javavm.framework/versions/current/ Commands/javahlrwxr-xr-x 1 root wheel 9 00:23 javap-/system/library/frameworks/ Javavm.framework/versions/current/commands/javaplrwxr-xr-x 1 root wheel 9 00:23 javaws- >/system/library/frameworks/javavm.framework/versions/current/commands/javaws
It's all soft links.
CD /system/library/frameworks/javavm.framework/versions/
LS-ALLDRWXR-xr-x OneRoot Wheel374 9 at xx: at. DRWXR-xr-x OneRoot Wheel374 9 at xx: at .. LRWXR-xr-x1Root WheelTen 9 at xx: at 1.4-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.4.2-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.5-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.5.0-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.6-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.6.0-CURRENTJDKDRWXR-xr-x7Root Wheel238 9 at xx: atALRWXR-xr-x1Root Wheel1 9 at xx: atCurrent--ALRWXR-xr-x1Root Wheel - 9 at xx: atCURRENTJDK-/system/library/java/javavirtualmachines/1.6.0. jdk/contents
Current points to A,a, which is 1.8.
I installed myself 1.6 in currentjdk, remove the previous soft link, execute currentjdk, OK, if you want to restore to 1.8, re-establish the soft link
sudo rm-rf currentln- s currentjdk current LS-Alltotal -drwxr-xr-x OneRoot Wheel374 9 at xx: +. DRWXR-xr-x OneRoot Wheel374 9 at xx: at .. LRWXR-xr-x1Root WheelTen 9 at xx: at 1.4-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.4.2-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.5-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.5.0-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.6-CURRENTJDKLRWXR-xr-x1Root WheelTen 9 at xx: at 1.6.0-CURRENTJDKDRWXR-xr-x7Root Wheel238 9 at xx: atALRWXR-xr-x1Root WheelTen 9 at xx: +Current--CURRENTJDKLRWXR-xr-x1Root Wheel - 9 at xx: atCURRENTJDK-/system/library/java/javavirtualmachines/1.6.0. jdk/Contentsjava-Versionjava version"1.6.0_65"Java (TM) SE Runtime Environment (build1.6.0_65-b14-466.1-11m4716) Java HotSpot (TM) --bit Server VM (build20.65-b04-466.1, mixed mode)
MAC JDK 1.6 Installation: Whether toxic, self-judgment, because Xcodegoast, a little afraid of the heart.
http://download.csdn.net/download/zw_yuyan/8350587
Mac JDK 6 settings