Install JAVAJDK in CentOS6.5

Source: Internet
Author: User
1. how to install JAVAJDK on CentOS: directly use rpm to download [html] viewplaincopyprint? Http://www.oracle.com/technetwork/java/javase/downloads 1. CentOS Install java jdk Method 1: directly install with rpm

Go to the official website to download

 

[Html]View plaincopyprint?
  1. Http://www.oracle.com/technetwork/java/javase/downloads/index.html

Select RPM to download the file. My choice is 64-bit.

 

 

[Php]View plaincopyprint?
  1. Jdk-8u5-linux-x64.rpm

Then run the command to install it directly (the yum execution is *. rpm in the current directory)

 

 

[Html]View plaincopyprint?
  1. Yum install jdk-8u5-linux-x64.rpm
Method 2: install openJDK

 

[Html]View plaincopyprint?
  1. Yum list | grep openj # View software installation

 

 

[Html]View plaincopyprint?
  1. Yum install java-1.7.0-openjdk

 

2. Install java jdk in Ubuntu Method 1: install OpenJDK

 

 

[Html]View plaincopyprint?
  1. Sudo apt-get install openjdk-7-jdk

This can be directly installed, or you can directly query the installation.

 

 

[Php]View plaincopyprint?
  1. Sudo apt-get install openjdk and press the TAB key. The program automatically searches for software that starts with openjdk.
[Html]View plaincopyprint?
  1. The program will output Display all 311 possibilities? (Y or n), press y to list the software.


Enter the following information to start installation.

 

 

[Html]View plaincopyprint?
  1. Sudo apt-get install openjdk-7-jdk

 

Method 2: rpm installation and download

In the debian system, the rpm format cannot be directly installed. you must use alien to convert the format to the deb format.

Install

 

[Html]View plaincopyprint?
  1. Sudo apt-get install alien

Then, convert the format to install.

[Html]View plaincopyprint?
  1. Alien-I jdk-8u5-linux-x64.rpm # install directly, this time is too long, first convert to DEB package, then install

Or convert to DEB and install

 

 

[Html]View plaincopyprint?
  1. Alien-d jdk-8u5-linux-x64.rpm # generate Debian package

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.