1.安装java11
1.1 安装参考
LINUX安装JDK_liunx上安装ocean-CSDN博客
1.2 检查
java -version
2.Maven 项目pom文件修改
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
3.Idea配置修改
4.低版本运行高版本编译代码报错
has been compiled by a more recent version of the Java Runtime