Linux CentOS 7 under JDK installation

Source: Internet
Author: User

1. Create a Java directory under the/usr/directory

[Email protected] ~]# Mkdir/usr/java
[Email protected] ~]# Cd/usr/java

2. Copy jdk1.8 to the Java directory, unzip to the current directory

[Email protected] java]# TAR-ZXVF jdk-8u131-linux-x64.tar.gz

3. Setting Environment variables

[Email protected] java]# Vi/etc/profile

I add the following information

Set Java environment
java_home=/usr/java/jdk1.8.0_131
Jre_home=/usr/java/jdk1.8.0_131/jre
Class_path=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
Export Java_home jre_home Class_path PATH

: Wq Save Exit

Let the saved environment variable take effect

[Email protected] java]# Source/etc/profile

Verify that the JDK configuration is in effect

[Email protected] java]# java-version
OPENJDK Version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-bit Server VM (build 25.102-b14, Mixed mode)

Linux CentOS 7 under JDK installation

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.