JDK has been updated to 19.2, and JDK1.8 is a relatively stable version. There are a lot of JDK1.8 installation and configuration tutorials on the Internet, but many of them are outdated. Complete graphic tutorials for each step, you can download according to your own needs, the latest version of 2023~
1. Download
1.1 Official website download address JavaSE Upgrade
1.2 Enter the official website, click Products
1.3 Click Java
1.4 Enter the interface and scroll down to find the Java download interface, click Download Java now
1.5 Click Java archive to enter the historical version,
1.6 Find the JDK corresponding to your computer and click to download. I chose JDK1.8 64-bit here
1.7 Need to register and log in to Oracle account
You can download after login
Two, JDK installation
2.1 Double-click the downloaded installation file, click Next to start the installation
2.2 Change the default directory, click Next
The new directory name is jdk plus version number
2.3 Prompt to install JRE, change the default directory, and create a new directory named jre plus version number
Continue to click next
2.4 Complete the installation, click Close
3. About configuring environment variables
The jdk after 1.8 will automatically add environment variables, so we don't need to configure the environment
3.1 Check whether the environment variables are configured properly
Right-click "This PC", click "Properties", click "Advanced System Settings", in the "Advanced" column, click "Environment Variables"
You can see that the path variable has been automatically configured with the value C:\ProgramData\Oracle\Java\javapath
3.2 Check whether the configuration is successful
Keyboard win+R, enter cmd, click OK, you can enter the command line window
Enter the statement Java -version, press the Enter key, we can see the installed version information, prompting that the current Java version number is 1.8.0_361
At this point, the JDK installation is complete.