1. Copy jdk-8u77-linux-x64.tar.gz from the shared folder to the/usr/java directory (the Java folder is not created using the mkdir java/command).
2. Unzip the file, command reference: http://www.cnblogs.com/yangzhilong/p/5350855.html
3. Configure Environment variables
#vi/etc/profile
At the end of the file, add:
Java_home=/usr/java/jdk1.8.0_77
Path= $PATH: $JAVA _home/bin
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home PATH CLASSPATH
4. Restart after saving, use Java and Javac command to test and install.
In the actual operation process, found that the system startup and typing Java/javac command will prompt permission is not enough, in fact, classpath variable can not match, in addition you can use chmod command to modify the permissions control of the 2 jar, but it is recommended to do so
Installing JDK under Linux