Article Directory
1. The cause of the problem and the error picture
-
problem causes
原因是有多个版本的jdk,导致maven不知道该用哪个
-
Error picture
2. Solution (configure pom.xml file)
-
File→Settings→Maven→Runner→Select the corresponding JDK version
-
-
The pom.xml file is added to specify the corresponding JDK version
<properties> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> </properties>
Summarize
Maven设置要和pom.xml配置文件指定的JDK版本要一致