Linux installation JDK

Source: Internet
Author: User

1. View the available JDK versions

After the login server is successful, enter the following command to view the supported JDK versions

Yum-y List java*

Because the server version is 64-bit, I would like to install 1.8 jdk, so select the marked version, to install;

PS: with-devel installed is the JDK, without-devel, actually installed is jre!

2. Installing the JDK

Enter the following command to wait for the installation to complete:

Yum Install-y java-1.8.0-openjdk-devel.i686

4. Verifying the installation results

Enter the command:

[Email protected] ~]# java-version

The presence of this information indicates that the JDK installation was successful.

5. View JDK Version information

If you want to view the installation information for the JDK, you can enter the following command to view:

Cd/usr/lib/jvm

Go to the installation directory and enter the following command:

Ls

5. Configure the default JDK version

If you have several different versions of the JDK installed, you can view the installed JDK with the following command:

Update-alternatives--config Java

The display interface is as follows:

If you want to keep the current version "*" Unchanged, press ENTER to select a different version, please enter the number.

Linux 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.