Install JDK in Linux. Install jdk in linux

Source: Internet
Author: User

Install JDK in Linux. Install jdk in linux
Prepare networked Linux systems with known IP addresses; Xftp software; jdk-8u45-linux-x64.rpm files; Xshell software; Use Xftp to upload jdk-8u45-linux-x64.rpm files in Windows to Linux systems for convenience, upload the jdk-8u45-linux-x64.rpm file to the Linux root directory this time; connect to the Linux System Using Xshell software; unzip the jdk-8u45-linux-x64.rpm File 」

RPMs-ivh/jdk-8u45-linux-x64.rpm

Rename a folder

Mv/usr/java/jdk1.8.0 _ 45/usr/java/jdk1.8

The mv command can be used to move or rename a file.

Eg. Rename directory A to B --- mv A B

Eg. Move the/a directory to/B and rename it to c --- mv/a/B/c.

Configure Environment Variables

Vi/etc/profile

Enter edit mode and enter the following content:

########### JDK ###########
JAVA_HOME =/usr/java/jdk1.8
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export JAVA_HOME
Export PATH
Export CLASSPATH

Save and exit

Make environment variables take effect

Source/etc/profile

Check whether JDK configuration takes effect

Javac-version

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.