The jkd on the computer was configured when I was in college. After looking at the official website, I wanted to change it.
1. Download the version you want to replace from the official website. The landlord downloaded the compressed package, just unzip it directly.
Official Website: Java Downloads | Oracle China
Unzip after downloading. (Put it together with the original version, because I'm afraid I can't find it)
2. Modify the environment variable.
Right click on 'This Computer' --> click 'Properties' --> click 'Advanced System Settings' --> click 'Environment Variables' --> System Variables
Click 'JAVA_HONE' and 'Path', then click 'Edit' to modify the file path. (That is, change the original version file name to the latest version file name)
Check the version: win+r, enter cmd, and enter java -version after the command prompt
The version number after the change is displayed, indicating that the change was successful!
ps: After reading the articles of other bloggers, you also need to delete the files in C:\Program Files (x86)\Common Files\Oracle\Java\javapath, modify the registry information, etc. (the landlord did not delete or change, according to personal Need to come ~).
3. Change of jdk version in idea
File-->Project Structure-->Platform Settings-->SDK-->Click '+'-->Click 'Add SDK'
Select the changed folder for the path (that is, the modified path in the environment variable), and click OK.
Click 'Project Settings'-->Click 'Project', the drop-down will have the jdk name just added, select it and click OK!
Run a file to try~success~~~