xshell installs jdk1.8 environment

xshell installs jdk1.8 environment

Hello everyone, today we are going to learn how to install jdk1.8 environment with xshell. It’s a good read and a good study. It’s very detailed.

first step

Enter xshell official website to download

Step 2

Open xshell and create a new session, as shown below:

Insert image description here

Insert image description here

third step

Enter your name, host IP, and port number (default is 22), confirm that there are no problems, and click Confirm to log in, as shown below:

Insert image description here

Insert image description here

the fourth step

First enter the local file and create a file in the local file to save the jdk file, as shown in the following figure:

 进入文件命令:cd /usr/local/
 创建文件命令:mkdir 文件名

Insert image description here
Insert image description here

the fifth step

Enter the file you just created and upload the jdk file, as shown below:

Insert image description here

Insert image description here

Insert image description here

Step 6

Unzip the uploaded jdk file, and delete the jdk compressed package after decompression, as shown in the following figure:

 解压命令:tar -zxvf 文件名
 删除文件命令:rm -rf 文件名

Insert image description here
Insert image description here

Step 7

After decompression is complete, you can configure the environment variables, as shown in the figure below:

 配置环境变量命令  vim /etc/profile (vim和vi都可以)
 

Insert image description here

 export JAVA_HOME=/usr/local/javaEE/jdk1.8.0_371 (这里的路径是刚才解压jdk文件的路径)
 export JRE_HOME=${
    
    JAVA_HOME}/jre
 export CLASSPATH=.:${
    
    JAVA_HOME}/lib:${
    
    JRE_HOME}/lib
 export PATH=${
    
    JAVA_HOME}/bin:$PATH
 编辑完先按Esc,再使用命令 :wq! 强制保存文件,并退出vi
 重新加载命令:source /etc/profile
 查看Java版本命令:java -version

Insert image description here
Insert image description here

Insert image description here
Insert image description here

In this way, the jdk installation is completed.

Conclusion

This is the introduction to the jdk1.8 environment for xshell installation. Everyone is welcome to give your advice, communicate with each other, and learn together.

Guess you like

Origin blog.csdn.net/qq_43715354/article/details/131521562