Error:java: Compilation failed: internal java compiler error

错误信息:

Information:Using javac 1.8.0_73 to compile java sources
Information:java: javacTask: 源发行版 1.8 需要目标发行版 1.8
Information:java: Errors occurred while compiling module 'EZSonar'
Information:Module "EZSonar" was fully rebuilt due to project configuration/dependencies changes
Information:2016/11/21 14:08 - Compilation completed with 1 error and 0 warnings in 5s 242ms
Error:java: Compilation failed: internal java compiler error

解决办法:
在pom依赖中添加一下代码

  <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

因为在ide中制定了使用pom中的编译版本。

请看下文的矩形选中框

标签: none

相关文章推荐

添加新评论,含*的栏目为必填