Installing JDK under Linux

Source: Internet
Author: User

The first is to use a Linux-brought Yum tool, such as the Yum search JDK, to search the JDK software, choose the search itself, and install it for your own software version. Like yum install java-1.7.0-openjdk.x86_64


The second way is to download the installation of their own official website. Specific as follows:

1. The following required version of the official website, such as 32-bit, or 64-bit Linux version.

2. Select the installation location, such as/usr/jdk/. If not, you can create a new directory

3. Unzip the downloaded file, for example: TAR-ZXVF jdk-7u45-linux-x64.tar.gz

4. Configure environment variables, here are two ways to configure

A. In the/etc/profile file configuration, valid for the global, that is, all users are valid, vim/etc/profic, Add the following content:

Export java_home=/usr/j DK /jdk1.7.0_45
export path= $PATH: $JAVA _home/bin

B. Or in the ~/.BASHRC file configuration, only valid for the current user, add the same content, as above

5.source/etc/profile or source ~/.BASHRC make it effective

6. See if the installation succeeded Java-version. Javac Detecting whether a compilation environment is installed


Installing JDK under Linux

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.