CentOS 7 java1.8 Installation

Source: Internet
Author: User

  • Java installation
    • Check the version information, if the version is less than 1.8, execute the following command
      • java-version
        • Java version "1.8.0_14 4 "
          Java (tm) SE Runtime Environment (build 1.8.0_144-b01)
          Java HotSpot (tm) 64-bit Server VM (build 25.144-b01, mixed mode)

    • Check installed Java version
      • rpm-qa | grep java
        • Python-javapackages-3.4.1-6.el7_0.noarch
          Javapackages-tools-3.4.1-6.el7_0.noarch

      • Uninstall installation Package: rpm-e--nodeps javapackages-tools-3.4.1-6.el7_0.noarch
    • go to/usr/local/
    • wget http ://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.rpm? authparam=1501516880_f4ac49940b86354cd3ff7fb199a9d413
    • Install the download package: Rpm-ivh jdk-8u144-linux-x64.rpm? authparam=1501516880_f4ac49940b86354cd3ff7fb199a9d413
    • Verifying installation   java-version
  • Configuring Environment variables
    • VI +/etc/profile
    • Append the following content
      •  

        java_home=/usr/java/jdk1.8.0_144
        Jre_home= $JAVA _home/jre
        Path= $PATH: $JAVA _home/bin: $JRE _home/bin
        Classpath=: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib/dt.jar
        Export Java_home jre_home PATH CLASSPATH

    • Source/etc/profile Enabling environment variables
    • echo $PATH View Environment variables

CentOS 7 java1.8 Installation

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.