"Error: java: Invalid source release: 13" when Idea starts running, how to solve it?

The above is based on the JDK1.8 project as an example. If you are using other versions, please select the corresponding language level.

The meaning of the language level of the project in idea

Language level refers to the jdk version used to compile the project code. Well, there are two small problems starting from this definition.

❶ If the project sdk is jdk8, what should the language level be? The available values ​​are 8, 7, 6...1. Which value indicates which version of the java compiler is used when compiling the code, although the project sdk is 8 , but sdk8 can compile jdk7-compatible bytecode. That is to say, a higher version of SDK can compile the bytecode of a lower version of JVM.

❷ The language level here must not be set higher than 8, such as setting 11, 17, etc., that will not work because the SDK version limits its highest compiled version.

Supongo que te gusta

Origin blog.csdn.net/qq_37860634/article/details/135356612
Recomendado
Clasificación