Tag Archives: Compiled version

Java Error | Error:java: Compilation failed: internal java compiler error

Background

Error:java: Compilation failed: internal java compiler error

According to previous experience, the compiling environment of the read project is reset, and the JDK version is all specified as 1.8
1. Setting – & gt; Java complier

2.Project Structure->Modules

After the above steps are set, the same error will be reported in the recompile run

Solution

After investigation, the project Pom.xml The file does not specify a compiled version, in the Pom.xml Add the following plug-ins:

<build>

    <plugins>
        <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
            <version>3.7.0</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>utf-8</encoding>
            </configuration>
        </plugin>
    </plugins>

</build>