Build the JDK inside the test environment with Linux commands

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/usr directory via XFTP to the specified virtual machine

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-versionjava Version "1.8.0_121" Java (tm) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot (tm) 64-bit Server VM (build 25.121-b13, Mixed mode)

Build the JDK inside the test environment with Linux commands

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.