1 website Download jdk
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Jdk-8u71-linux-x64.tar.gz
2 unzip and move to the new directory/usr/java
#tar-XZVF jdk-8u71-linux-x64.tar.gz
#mkdir-P/usr/java
#mv Jdk1.8.0_71/usr/java
Establish links
#ln-S Jdk1.8.0_11 java-8
3 Setting environment variables
#vi ~/.BASHRC
At the end of the file, add
Export Java_home=/usr/java/java-8export Jre_home=${java_home}/jreexport classpath=.:${java_home}/lib:${jre_home}/ Libexport Path=${java_home}/bin: $PATH
Save the exit and use the command to make the script effective:
#source ~/.BASHRC
4 Test verification
#java-version
the chmod command changes the permissions of all subdirectories (including hidden files) and then executes
#java-version
The following message appears stating that the installation was successful.
ubuntu14.04 64-bit JDK installation