【发布时间】:2017-10-19 12:42:02
【问题描述】:
我有一个 maven 项目,并已将 intellij 配置为使用 java 8。我的一位同事推动了一项在接口中使用 default 关键字的更改。自从我同步他的更改后,我的编译一直失败。
我目前很困惑,无法在网上找到答案。
以下是来自 Intellij 的错误消息。目前在我的设备上安装了1.8.0_111-b14 版本的Java 和Intellij 2016.3.4。
Information:18/10/17, 1:06 PM - Compilation completed with 1 error and 0 warnings in 3s 442ms
Information:javac 1.8.0_111 was used to compile java sources
Error:(17, 16) java: default methods are not supported in -source 1.7 (use -source 8 or higher to enable default methods)
【问题讨论】:
-
你的 pom.xml 中有 maven 编译器插件吗?
标签: java maven intellij-idea java-8