JDK installation of CentOS

Source: Internet
Author: User

1. Environmental description

  System: centos6.7, 2.6.32-573.el6.x86_64; Jdk:jdk1.7.0_80

2. Download the JDK and upload it

Download Jdk-7u80-linux-x64.tar.gz,crt upload to the/opt directory

3. Decompression

TAR-ZXVF jdk-7u80-linux-x64.tar.gz

4. Environment variable Configuration

Vi/etc/profile;

Add the following at the end:

# jdk1.7.0_80 Settings
Java_home=/opt/jdk1.7.0_80
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
Export Java_home jre_home PATH CLASSPATH

The source/etc/profile is then executed to make the configuration effective.

5. Testing

# java-version
Java Version "1.7.0_80"
Java (TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot (TM) 64-bit Server VM (build 24.80-b11, Mixed mode)

Test success!

JDK installation of CentOS

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.