Install JDK1.7 and linuxjdk1.7 in Linux
LinuxInstallJDK1.7
1. Prepare materials
2. Create the/usr/local/java directory and put the JDK Installation File into it.
Mkdir/usr/local/java
3. Decompress JDK to the current directory.
Tar-zxvf jdk-7u79-linux-x64.tar.gz
Get the jdk1.7.0 _ 79 folder.
4. Edit the configuration file and configure Environment Variables
Vim/etc/profile
Enter I to add jdk configuration information at the bottom of the file
# Java PathJAVA_HOME =/usr/local/java/jdk1.7.0 _ 79 CLASSPATH = $ JAVA_HOME/lib/PATH = $ PATH: $ JAVA_HOME/binexport PATH JAVA_HOME CLASSPATH
For example
Press Esc to exit editing, and enter: wq to save and exit.
5. Enter the command to make the configuration take effect immediately
Source/etc/profile
6. Check the installation status.
Java-version
The displayed version indicates that the installation is successful.