Install Oracle JDK in CentOS 7

Source: Internet
Author: User

Install Oracle JDK in CentOS 7

Install Oracle JDK in CentOS 7 and check whether JDK is provided in Linux. If openJDK is available, uninstall it.

Java-version

Rpm-qa | grep-E '^ open [jre | jdk] | j [re | dk]'

Uninstall openjdk

Su root
Yum-y remove java java-1.7.0-openjdk

Download oracle jdk

Wget -- no-cookies -- header "Cookie: Maid = accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz

Decompress jdk

Tar-xzvf jdk-8u77-linux-x64.tar.gz

Move jdk to/usr/local to establish a soft connection

Mv jdk1.8.0 _ 77 // usr/local
Ln-s/usr/local/jdk1.8.0 _ 77 // usr/local/jdk

Edit/etc/profile

Vim/etc/profile

Add jdk Configuration

JAVA_HOME =/usr/local/jdk
PATH =$ {PATH }:$ {JAVA_HOME}/bin
Export JAVA_HOME PATH

Source

Source/etc/profile

Check whether jdk is successfully installed.

Java-version

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Build a JDK environment using CentOS

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

CentOS6.3 install JDK and environment Configuration

Install JDK 8 on Ubuntu 14.04

Install JDK graph analysis in Ubuntu

This article permanently updates the link address:

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.