Centos 6.7 Installation JDK

Source: Internet
Author: User

Summary:

The JDK installed in general is OPENJDK, but OpenJDK is obviously missing part of the source code, so download the JDK installation, this article installs the JDK version is: jdk-7u79.

1. First download JDK version to Oracle website

Website: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

2, upload files to CentOS, I use lrzsz tools to upload, you can also use FTP upload.

1) Create a folder

Mkdir/usr/local/java

2) upload the file to the Java directory

3) Unzip

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

4) Modify the/etc/profile configuration file

Vi/etc/profile

Add at the end of the file

Export java_home=/usr/local/java/jdk1.7. 0_79export jre_home=/usr/local/java/jdk1.7.0_79/jreexport PATH= $PATH:/usr/local/java/jdk1.7.0_79/binexport CLASSPATH=./:/usr/local/java/jdk1.7.0_79/lib:/ Usr/local/java/jdk1.7.0_79/jre/lib

5) Make the configuration file effective

Source/etc/profile

6) Verify that the JDK is installed successfully

Java-version

If prompted as shown, the installation is successful.

Centos 6.7 Installation JDK

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.