java1.7maven,从1.6升级到1.7(基于maven的项目)后,无法在Jetbrains Intellij中使用Java 1.7进行编译...

Using Jetbrains 11.2 project based on a Maven project. Then I required to move to 1.7. I have 1.7 installed , I updated my pom.xml and I can rebuild the whole package using maven okay.

I've modified every setting I can see in Intelli Projects settings regarding Java version

Project SDk

Project language Level

Modules Languages/Sources/Language Level

Modules Languages/Dependencies/Module SDK

but I cannot get it to compile a file it complains:

Error:javac target release of 1.6 conflicts with source release 1.7

I then tried on my other dev machine using the same codebase but a different Intellij Project and on this I get a similar error:

Error:javac: source release 1.7 requires target release 1.7

I cannot see anything else to change in order to get this working.

解决方案

Doh, found it

File/Settings/Java Compiler/Additional command line parameters

changed from -target 1.6 to -target 1.7

Does seem wierd for it to be here though, disconnected from the rest of the related options.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值