CentOS7 Java Installation

Source: Internet
Author: User

CentOS7 Java Installation

CentOS7 java installation Download
    • Download jdk-8u31-linux-x64.rpm from Oracle
Install
    • Imperial Load

Execute the following command

- version
Yum Remove Java-1.7. 0 - OpenJDK
    • Installation

Upload the rpm file to the/tmp directory

/ tmp
- IVH JDK - 8u31 - Linux - x64 . rpm
    • Environment variables

Create a new java.sh under the/ETC/PROFILE.D directory

#!/bin/bash
Java_home=/usr/java/default
PATH=$JAVA _home/bin:$PATH
CLASSPATH=.:$JAVA _home/Lib
Export PATH Java_home
Export CLASSPATH

and give Execute permission

+/etc/profile. D / Java . SH
/ etc / Profile . D / Java . SH
    • Other

Check Connection

ls-La/usr/bin/Java
LS-La/usr/bin/Javac
LS-La/usr/bin/Javadoc
LS-La/usr/bin/Javaws
LS-La/usr/bin/Jcontrol

Update connection

LN-SF $JAVA _home/bin/Java/usr/bin/Java
ln-SF $JAVA _home/bin/Javac/usr/bin/Javac
ln-SF $JAVA _home/bin/Javadoc/usr/bin/Javadoc
ln-SF $JAVA _home/bin/Javaws/usr/bin/Javaws
ln-SF $JAVA _home/bin/Jcontrol/usr/bin/Jcontrol

CentOS7 Java Installation

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.