1. Under the official website to update the Java version of the Jdk2.mov to the previous installation path, such as/USR/LIB/JDK/3. Change path, modify the Javahome path in ~/.BASHRC. 4.Update default JDK
# update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk1.8.0_05/bin/java 300
# update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.8.0_05/bin/javac5. Restart, why not direct source, because the original Java path still exists. 5.java-versionattached: Linux Java installation method
install SUN-JAVA6-JDK
download Jdk-6u45-linux-x64.bin put it in the shared directory
sudo mkdir / usr /lib/" Span style= "FONT-SIZE:12.0PT; Font-family:calibri; Color: #262626 ">jdk
./jdk-6u45-linux-x64.bin
sudomv jdk1.6.0_45/usr/lib/jdk
sudoVI ~/.BASHRC(Individual users)or/etc/BASH.BASHRC(System Users),Add
export java_home=/ usr /lib/ jdk /jdk1.6.0_45
Export jre_home=${java_home}/ JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
Select the version to use after installation;sudo update-alternatives--config javaRemember to change the path of Javahome.///usr/lib/jvm/java-7-openjdk-amd64
Null
Update Java version under Ubuntu