出现“ java: 错误: 无效的源发行版:19 “的解决方法
在使用IDEA时出现了 ”java: 错误: 无效的源发行版:19“报错
解决方法:
首先确定配置中三处jdk版本保持一致:
第一处:

第二处:

第三处:

三处统一之后问题应该基本解决了,但是JDK版本如果在9以上可能会因为丢失jar包仍然报错,这时候需要在pom文件里添加以下依赖
<!--jdk9以上缺失的jar包-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
问题解决。

浙公网安备 33010602011771号