problem
Using IDEA to look at the source code, there is a .class file instead of a .java file, which is still the case when uninstalling and reinstalling.
The situation is now
Just use IDEA, when we want to view the source code like eclipse, we will press Ctrl+ 鼠标左键
but the .class file appears, as shown in the figure
below, there is a line of English below
-
Decompiled .class file, bytecode version:55.0(Java 11)
-
Translation : Decompiled .class file bytecode version: 55.0 (Java 11)
Solution
Use your own JDK
Choose your own JDK when creating the project,
click New as shown below , choose the JDK path you installed, and then just as before. In this way, the project you created is a .java file when looking at the source code.
Then, set it up, as shown below