Switch between different versions of JDK in IDEA (if online methods are useless, you can come and have a look)
Background: The team leader gave me a code developed by eclipse. I imported it into IDEA. I have been developing with JDK1.8. After finishing the work, I found that the server environment is JDK1.7. Then I changed the JDK directly in the IDE to recompile. Unexpectedly, the road was bumpy.
**
Please see the end
**
General methods online:
Step 1:
Select SDK and import the folder where the corresponding JDK is located.
Step 2:
Select the jdk language standard used by the module by default
Step 3:
Import the native dependencies of the corresponding version of jdk
Step 4:
Set the default value of SDK
If it still doesn't work, step five appears again:
Anyway, I did it all, and I uninstalled jdk1.8, but it didn't happen, but it still prompted me that I could not compile.
Here comes the most important step
If you still can't get it through the above five steps, you can try this.
Try to remove this default option, anyway, I do this, and then it will work, and if you import multiple modules, each module jdk version is different, also remove this option.
For multiple modules, specify the version here and remove the first default option below.
I only solved the problem after seeing the blog of this old man
https://blog.csdn.net/dataiyangu/article/details/95621931