Install jdk1.8 and configure Java environment under Linux system

Source: Internet
Author: User

I. Download and install the JDK

1. View the number of Linux system bits

Xshell Input: getconf long_bit

   

Download JDK 2.ORACLE website

Jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

   

3. Uploading files to a Linux server

Use WINSCP to easily copy the JDK package to the server

4. Unzip the JDK archive package

Tar-xvzf jdk-8u151-linux-x64.tar.gz

Second, configure the Java environment

1, Command: Vi/etc/profile, enter the bottom of the G, return

  

2, add the following configuration at the bottom of the/etc/profile, input I can move the cursor edit

  

3. Press ESC when editing is complete, I bottom insert key disappears, enter (: x) Save exit

  

4, check whether the installation is complete, and version

Java-version

Install jdk1.8 and configure Java environment under Linux system

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.