Installing the JDK under the Centos-linux system

Source: Internet
Author: User

In general, Linux systems have their own JDK, but do not meet development requirements, so you need to uninstall, reinstall the JDK

Step 1: View the JDK version of an existing installation

Command:

Rpm-qa | Grep-i Java

Step 2: Uninstall the existing software

Command:

RPM-E--nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.e16.i686

RPM-E--nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.e16.i686

Step 3: Unzip the JDK

Command:

TAR-ZXVF jdk-8u151-linux-i586.tar.gz

Step 4: Move the JDK to "/usr/local/src/java" and rename

Command:

MV jdk1.8.0_151/usr/local/src/java/jdk1.8

Step 5: Configure the system environment variables

Command:

Vim/etc/profile

To add related variables in the configuration file:

Export java_home=/usr/local/src/java/jdk1.8

Export path= $JAVA _home/bin: $PATH

Step 6: Make the configuration file effective and test

Command:

Source/etc/profile

Java-version

Javac

Complete!!!!!

Installing the JDK under the Centos-linux system

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.