Installing JDK8
Check if the system comes with OPEN-JDK input command:
#rpm-qa|grep Java
#rpm-qa|grep JDK
If no input information indicates no installation, if installation can enter command: #rpm-QA | grep java | Xargs rpm-e--nodeps Bulk unload all files with Java.
Retrieve the list input command containing Java: #yum list java*
Retrieves a list of 1.8 input commands: #yum list java-1.8.*
Install all file input commands for 1.8.0: #yum lnstall java-1.8.0-openjdk*-y
To see if the installation succeeded Input command: # java-version
This process does not need to be configured specifically for path, and is configured automatically.
Find the JDK installation path
When Java_home is not configured, the command: #echo $JAVA _home can not find the path to install Java, which Java to navigate to the Java program execution path. The Java installation path is then found.
[Email protected] ~]# Java-Versionjava version"1.7.0_51"OpenJDK Runtime Environment (Rhel-2.4.5.5. el7-x86_64 u51-B31) OpenJDK --bit Server VM (build24.51-b03, Mixed mode) [[Email protected]~]# which Java/usr/bin/Java[[email protected]~]# ls-lrt/usr/bin/javalrwxrwxrwx.1Root root ASeptember6 A:Wuyi/usr/bin/java-/etc/alternatives/Java[[email protected]~]# ls-lrt/etc/alternatives/javalrwxrwxrwx.1Root root theSeptember6 A:Wuyi/etc/alternatives/java-/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5. El7.x86_64/jre/bin/java
Linux installs JDK with Yum