When the idea to use java version problem

Details being given in the following figure:
IntelliJ IDEA compile error
Error Analysis:
compile java project using java 11 version, in fact, the compiler is not dependent jdk 11 version.

Solution:

1.Maven project check pom.xml file java.version configuration.

Check the configuration in pom.xml java.version
2. Check jre environment configuration under the Maven runner in the Settings IntelliJ IDEA.

runner under examination Maven jre Configuration

Project pom.xml in java.version configuration is 11, and the configuration of the Maven runner is jdk8, do not match.

3. In the Settings IntelliJ IDEA project in the compiled version checking compiler (Compiler of the Java Compiler) in.

Java Compiler Compiler version under examination Compiler
4. Project check Project, Modules, jdk version of the SDKs for IntelliJ IDEA Structure.

Project Structure check Project
Project Structure check Modules
Project Structure check SDKs

Published 15 original articles · won praise 0 · Views 295

Guess you like

Origin blog.csdn.net/qq_36283674/article/details/104076969