Table of contents
1. JDK download
Official website download address: https://www.oracle.com/index.html
Choose the version you need to download: Here I take Java14 as an example ( because I have downloaded Java14.0.2 before this), so I will download Java14 again in the following installation steps
Java14 also has several versions, choose a version to download according to your needs
Click to download, if not, you should register an oracle account, fill in the information on the pop-up page to register an oracle account
2. JDK installation
Double-click the downloaded file and click Next
Note that this step can be installed to other disks
I installed it to the E drive, this is the file after downloading
3. Configuration
Find this computer, right click, click properties, find advanced system settings
Click Advanced System Settings, click Environment Variables, find System Variables, and click New
Variable name: JAVA_HOME
Variable value: D:\jdk14\jdk-14.0.2
After filling in the information, click OK
(Here again, 14.0.2 is the version downloaded before, and the above installation steps are for the convenience of recording my download process for everyone, so I downloaded 14 again, please don't get confused. Important Say things three times:
The variable value is the path where jdk is installed! ! !
The variable value is the path where jdk is installed! ! !
The variable value is the path where jdk is installed! ! ! )
New again
Variable name: CLASSPATH
Variable value: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
After filling in the information, click OK
Find the Path system variable, double-click to enter it, and create a new one respectively
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
then click OK
Remember, every time you fill in a piece of information, you must click OK
Finally, after all the information is configured, click OK
At this point, the installation and configuration of jdk is complete! ! !
Then, you can use the keyboard Win+R
to entercmd
to view the version you have installed. The command to check is: java -version