Linux installation JDK1.7
1. Preparation Materials
2. Create the/usr/local/java directory and put the JDK installation files in it
Mkdir/usr/local/java
3. Unzip the JDK to the current directory
TAR-ZXVF jdk-7u79-linux-x64.tar.gz
Get folder jdk1.7.0_79
4. Edit the configuration file, configure environment variables
Vim/etc/profile
Input I add JDK configuration information at the bottom of the file
# java pathjava_home=/usr/local/java/jdk1.7.0_79classpath= $JAVA _home/lib/path= $PATH: $JAVA _home/binexport PATH java _home CLASSPATH
Such as
Press ESC to exit Edit and enter : Wq Save to exit
5. Enter the command to make the configuration effective immediately
Source/etc/profile
6. Check the installation situation
Java-version
The displayed version information appears stating that the installation was successful
Linux installation JDK1.7