IntelliJ: Fatal error compiling: invalid target release: 1.8

前端 未结 3 931
遥遥无期
遥遥无期 2021-01-05 19:08

I\'m running a Java Maven project on IntelliJ, and I make sure that this project will be compiled by Java 1.8.

I set JRE to version 8 in Run/Debug Configuration

3条回答
  •  被撕碎了的回忆
    2021-01-05 19:28

    I assume you want to have it in version 8, despite so many comments telling you to set to 7.

    You probably missed the setting for the maven runner, this is under Preferences -> Build, Exection, Deployment > Build Tools > Maven > Runner, see attached image. You need to set that to Java 8 as well.

提交回复
热议问题