All jdk class library methods in IDEA cannot be found, the code is called red, and setting jdk is also invalid.
When I typed the code today, the computer unexpectedly had a blue screen (yes, the system is Windows10). When I restarted IDEA, the code was red, indicating that the JDK could not be found. In fact, the JDK has been correctly configured and imported, multiple versions have been replaced, the code has been re-imported countless times, and everything is the same - IDEA keeps prompting that the JDK is not set.
![](http://dl2.iteye.com/upload/attachment/0123/8035/f9608bce-35f7-365a-8775-fdecdef3805f.png)
The project settings are as shown below, and everything looks completely ok.
![](http://dl2.iteye.com/upload/attachment/0123/8037/68327da4-9350-3594-b4dc-351f200ee20b.png)
![](http://dl2.iteye.com/upload/attachment/0123/8039/023465d6-d60b-38fc-be63-2caa87a17fa6.png)
![](http://dl2.iteye.com/upload/attachment/0123/8041/e1d5b90a-afc2-32cc-aca9-f3f15edcb90b.png)
![](http://dl2.iteye.com/upload/attachment/0123/8048/6f62ca6f-f32b-3e92-b834-2db66f8d5ea8.png)
![](http://dl2.iteye.com/upload/attachment/0123/8050/0443447d-2e20-3bd8-9688-9575b407ec1f.png)
After setting the problem still persists:
![](http://dl2.iteye.com/upload/attachment/0123/8045/a78cc54f-b8bc-3468-8217-39aaa3972143.png)
Troubleshooting ideas:
1. Exclude code problems, roll back the code to the previous version, the problem remains
2. Exclude the project setting problem, checkout the project again, the problem is still the same; import other projects, there are similar problems
3. From this, it can be basically confirmed that it is the problem of the IDEA tool itself, Google [File]->[Invalidate Caches], the problem is solved
See also:
IntelliJ IDEA can't setup JDK