I. Go to the oracle website and download the jdk
oracle official website:Oracle | Cloud Applications and Cloud Platform
ps: different browsers, may enter the oracle official website, will only display part of the content, so it is recommended to use Google Chrome browser!
Before downloading, you first need to go to view the configuration model of the local computer, as shown below, right-click --- this computer --- choose to click on Properties, showing the x64 version as follows
I'm going to download the latest version of jdk here, jdk20.
I chose to put it in the D drive directory
Selected a good D disk directory under the file, and then click OK --- Next, until the download is complete!
After the completion of the download to the specified folder to unzip (this article choose to put in D:\jdk20)
II. Configuration jdk development environment
Configure environment variables for JDK, right click this computer ---- properties ---- Advanced System Settings ->Environment Variables (this post is for win10 as an example)
existCreate a new directory in the system variables as shown
Create JAVA_HOME (named "JAVA_HOME", which corresponds to the value written in the directory of the jdk installed on your computer) - click on Confirmation
Click to create a new system variable named "CLASSPATH" with a value of "
.;%JAVA_HOME%\lib\;%JAVA_HOME%\lib\;%JAVA_HOME%\lib;
"
Click OK after successful setup
Find the Path variable in System Variables and click on it to edit it.
Click New and enter "%JAVA_HOME%\bin", move it up to the top and save it (as follows).
III. Test Installation Success
Begin to test whether JDK20 installed successfully, use the shortcut command "Win + R" enter "cmd" to open the command window, type "java", click enter, type "java -version", click enter JDK20 version of the information appears to indicate that the JDK has been successfully installed, as follows:
ps: In summary, type Java -version If the Java version information appears, the jdk installation is successful!