Linux virtual machine installation JDK

Chapter 1, the use of xshell tools and xftp

1.1) xshell download and installation

①Used to remotely operate the Linux virtual machine system,
download the free version from the official website of the two tools: https://www.xshell.com/zh/

insert image description here
②Click to download, double-click the .exe file to install directly
insert image description here
③Always go to the next step to install directly
insert image description here

1.2) xshell connection

①File—"New Session—"Enter the IP address of the virtual machine—"Connect
insert image description here
②Enter the Linux account to confirm and enter the password
insert image description here
to connect and then you can remotely control the Linux system in xshell
insert image description here

1.3) xftp download installation and connection

same as xshell

Chapter 2, Install Java's JDK

2.1) Turn off the firewall and transfer the jdk compressed package to the Linux virtual machine

①Permanently close the firewall

systemctl disable firewalld.service

#重启Linux系统让其生效

reboot

②Log in to xftp to transfer the .tar compressed file of JDK1.8, and directly drag and drop the file to transfer the local file to the root folder of the virtual machine ③Decompress the
insert image description here
jdk compressed file to the /usr/local/java directory

tar -zxvf jdk-8u77-linux-x64.tar.gz -C /usr/local/java

22) Configure java environment variables

① Edit the /etc/profile file:

 vim /etc/profile

②Add the following configuration information at the end of the file

JAVA_HOME=/usr/local/java/jdk1.8.0_77
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME CLASSPATH

③Reload the /etc/profile file

source /etc/profile

④Use Javac command A to verify whether the configuration is successful
insert image description here

Guess you like

Origin blog.csdn.net/baomingshu/article/details/132032196