CENTOS7 Installing Oracle JDK

Source: Internet
Author: User

    • See if Linux has its own JDK, if openjdk, uninstall

1 java-version

1 rpm-qa | grep -e '^open[jre|jdk]|j[re|dk]'

    • Uninstalling OPENJDK

1 su Root 2 3 Yum -y remove Java java-1.7. 0-openjdk

    • Download Oracle JDK

1 wget " Cookie:oraclelicense=accept-securebackup-cookie; " " http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz "

    • Unzip the JDK
1 tar -xzvf jdk-8u77-linux-x64. tar. gz

    • Move JDK to/usr/local, establish soft connection

MV Jdk1. 8.0_77//usr/localln-s/usr/local/jdk1.  8.0_77//usr/local/jdk   

    • Edit/etc/profile
1 vim/etc/profile
    • Join the JDK Configuration
1 java_home=/usr/local/jdk2 path=${path}:${java_home}/bin3 Export Java_home PATH
    • Source
1 source/etc/profile
    • To see if the JDK was installed successfully
1 java-version

CENTOS7 Installing Oracle JDK

Related Article

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.