Linux installs JDK with Yum

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.