Installing Java under Linux (JDK8)

Source: Internet
Author: User

I. Preparation of documents

1.1 File name

Jdk-8u121-linux-x64.tar.gz

1.2

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

Second, tool preparation

2.1 Xshell

A powerful secure terminal emulation software that supports SSH1, SSH2, and the Telnet protocol of the Microsoft Windows platform.

Xshell's secure connection to remote hosts via the Internet and its innovative design and features help users enjoy their work in a complex network environment.

2.2 Xftp

A powerful sftp, FTP file transfer software based on the MS Windows platform.

With Xftp, MS Windows users can safely transfer files between Unix/linux and Windows PCs.

Third, the Operation procedure

3.1 Upload the downloaded JDK to the specified virtual machine directory via xftp

3.2 Connect to the virtual machine via Xshell, execute the following command to extract the file:

$ tar zxvf jdk-8u121-linux-x64.tar.gz

3.3 Setting environment variables using the VI Editor

$ sudo vi/etc/profile

At the end of the file, add the following:

#Java envexport java_home=/usr/jdk1. 8 . 0_121export CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarexport PATH= $PATH: $JAVA _home/bin

3.4 Exit the VI Editor to make environment variable settings effective immediately

$ source/etc/profile

3.5 Viewing JDK versions

$ java-"1.8.0_121"1.8. 0_121-  25.121-b13, Mixed mode)

Installing Java under Linux (JDK8)

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.