idea 无效的目标发行版,IntelliJ:致命错误编译:无效的目标版本:1.8

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

ff3901d8fd65f6fefd0fc12a19179a07.png

and also in Project Structure:

335f20c5ddb7c3f8daa1230084174d2c.png

My pom.xml file also includes java version 8 by the following:

1.8

1.8

and

org.apache.maven.plugins

maven-compiler-plugin

3.1

1.8

1.8

I also set Java compiler option to version 1.8.0f771aab5cf298fab309cbbb8c4f1ea9.png

When I run the project, I get an error:

Failed to execute goal

org.apache.maven.plugins:maven-compiler-plugin:3.0:compile

(default-compile) on project feed_matcher: Fatal error compiling:

invalid target release: 1.8 -> [Help 1]

Do you know how to resolve this issue?

P.S I followed this link: IDEA: javac: source release 1.7 requires target release 1.7 and I still couldn't resolve the problem.

解决方案

Look in Build Execution, Deployment > Compiler > Java Compiler

Then look for per module bytecode version

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值