Linux installation Java JDK (System: CentOS 6.5 jdk:jdk8.0)

Source: Internet
Author: User

System Environment: centos-6.5
Installation Method: RPM Installation
Software: jdk-8u20-linux-x64.rpm

: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Verify the current version:
[Email protected] ~]# java-version

List all Java-related software information:
[Email protected] ~]# Rpm-qa | grep java

Uninstall OPENJDK:
[[email protected] ~]# rpm-e--nodeps xxx (xxx for Java related software previously discovered)

To install the JDK:
[Email protected] jdk]# RPM-IVH jdk-8u20-linux-x64.rpm

verify installation to see if the information is normal:
[[email protected] bin]# java
[[email  Protected] bin]# javac
[[email protected] bin]# Java-version
java version "1.8.0_20"
java (TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot (TM) 64-bit Server VM (build 25.20-b23, Mixed mode)



append the following to the file:
java_home=/usr/java/jdk1.8.0_20
jre_home=/usr/java/ Jdk1.8.0_20/jre
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib /tools.jar: $JRE _home/lib
export java_home jre_home PATH CLASSPATH

Make the changes effective
[[email protected] ~]# source/etc/profile//Make changes effective immediately
[[email protected] ~]# echo $PATH//view PATH value

Linux installation Java JDK (System: CentOS 6.5 jdk:jdk8.0)

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.