Centos7 Installing Java

Source: Internet
Author: User

First step: Install the JDK; First check if the OPENJDK is present enter the following command

Java-version

If present, enter

Rpm-qa | grep java

Or

Rpm-qa | grep JDK

Xxxx_openjdk_xxx and other related information, copy one of the

Uninstall OPENJDK Enter the following command rpm-e--nodeps the JDK file name that you copied in the previous step

Or

Yum-y Remove the JDK file name from the previous step of the Java copy

Wait for the execution to complete repeat this step to replace the file name

Step two: Download the JDK

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Step three: Unzip

Fourth Step: Configure environment variables

vim/etc/profile.d/java.sh
Java_home=/software/jdk1.7.0_79class_path=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarpath= $JAVA _home/bin: $PATHexport java_home Class_path PATH
source/etc/profile.d/java.sh

Centos7 Installing Java

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.