2022-11-01 | JDK1.8 installation and configuration (windows10) by YUNER

JDK1.8 installation and configuration (windows10)

0. Reference blog

JDK1.8 download and installation (complete graphic tutorial) https://www.jianshu.com/p/efef80171a4a

JAVA JDK1.8 super detailed installation tutorial https://blog.csdn.net/weixin_56105534/article/details/122054195

1. Download JDK1.8

jdk1.8, also known as jdk8.0, is a relatively stable version at present.
The latest version of jdk is unstable, and various problems may occur in Java learning, so it is not recommended to download it.

1. Visit the official download address:

https://www.oracle.com/java/technologies/downloads/#java8
insert image description here

2. Select the required java history version

insert image description here

3. Choose the installation package suitable for your own operating system: Here we choose the last windows64-bit installation package, click jdk-8u202-windows-x64.exe to download.

insert image description here

4. Select to accept the agreement, log in to your ORACLE account, and the download is complete.

insert image description here

2. Installation (picture source blog https://www.jianshu.com/p/efef80171a4a)

1. Double-click the downloaded exe file to start the installation. As shown in the figure below, click Next.

insert image description here

2. Select the installation directory of jdk. It is recommended that you put it on the C drive even if you do not use the default path, unless your C drive is running out of space. My installation path: D:\YUNER\java\jdk1.8.0_202

insert image description here

3. Click Next directly, and the warning message shown in the figure below will appear. (The JDK version is updated quickly, and the official maintenance will stop in January 2019, which will not affect the continued use) Just click "OK" to continue.

insert image description here

4. Install jre (jre is a runtime package and part of jdk): If there is no special requirement, there is no need to change the installation directory, and click "Next". My installation path: D:\YUNER\java\jre

insert image description here

5. Finally, a pop-up window informs that the installation has been successful.

insert image description here

3. Environment variable configuration

1. Enter the interface for configuring environment variables: right-click My Computer –> Properties –> Advanced Environment Settings –> Environment Variables.

insert image description here

insert image description here

2. Environment variable configuration


(1) JAVA_HOME system variable: Under the D:\YUNER\java\jdk1.8.0_202 system variable, create a new system variable JAVA_HOME, and the attribute value is the installation path set by the JDK in the previous step.
When updating the JDK in the future, just modify this variable, and the remaining path and classpath do not need to be changed.
insert image description here

(2) Path system variable: D:\YUNER\java\jdk1.8.0_202\bin
Find path on the system variable, create a new one, attribute value: D:\YUNER\java\jdk1.8.0_202\bin.
(Add ;%JAVA_HOME%\bin at the end)

insert image description here

(3) Create a new CLASSPATH variable in the system variable:
.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
(if there is a CLASSPATH variable, add .;%JAVA_HOME%\lib;% directly to the front of the attribute value JAVA_HOME%\lib\tools.jar Note: There is a black dot plus a semicolon in front, and the classpath is for java to load the class (class or lib) path.)
insert image description here

Go all the way and make sure it's OK

3. Verification

(1) After Windows+R, enter cmd and press Enter.

insert image description here
(2) Input: java -version
insert image description here
(3) The environment variable configuration is successful.

4. JDK uninstall

Reference blog: The way to completely uninstall JDK1.8 by A Glass of Water Paradise 2020 https://blog.csdn.net/weixin_44249578/article/details/127290448

Guess you like

Origin blog.csdn.net/Kd_2number/article/details/127642490