CentOS 7 Installation JDK 1.8

Source: Internet
Author: User
  1. First check if the current Linux system installs Java

    rpm -qa | grep java
  2. If the list is displayed, use the command to uninstall it

    rpm -e --nodeps 要卸载的软件名或yum -y remove 要卸载的软件名
  3. Unzip the JDK to the specified directory

    tar –xvf jdk-8u172-linux-x64.tar.gz –C /usr/local/java
  4. Configuring the JDK environment variables

    vim /etc/profile#在文件最底部加入以下配置信息#set java environmentexport JAVA_HOME=/usr/local/java/jdk1.8.0_172export JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:$PATH
  5. Reload the/etc/profile configuration file to make it effective

    source /etc/profile
  6. Finally detects if the installation configuration was successful

    java -version

CentOS 7 Installation JDK 1.8

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.