Error phenomenon
When using idea to import a new project or upgrade idea or create a new project, the following exception message will appear:
Error:java: Compilation failed: internal java compiler error
Cause of error
This error is mainly caused by the JDK version. There are two reasons: the compiled version does not match, and the current project JDK version does not support.
View the JDK of the project
File -> Project Structure-> Project Settings -> Project or use the shortcut Ctrl + Alt + Shift + s to open the JDK configuration of the project:
Check whether these two points are consistent with the target JDK.
View the JDK of the project
Click modules in the figure above to view the corresponding JDK version:
View java compiler version
When importing Java projects, the probability of this problem is high.
To solve this problem, reopening or modifying the contents of the pom file (Maven project) is likely to cause the JDK version to change back to 1.5. If the project is a pojd file, you can specify the relevant information:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
Read More:
- [Solved] Errorjava Compilation failed internal java compiler error
- Errorjava Compilation failed internal java compiler error [How to Solve]
- [Solved] Error:java: Compilation failed: internal java compiler error
- [Solved] java: Compilation failed: internal java compiler error
- [Solved]Error:java: Compilation failed: internal java compiler error
- Compilation failed: internal java compiler error[How to Solve]
- [Solved] Java: compilation failed: internal java compiler error
- [Solved] Compilation failed: internal java compiler error
- IntelliJ idea compilation error: Error:java : Compilation failed: internal java compiler error
- Java Error | Error:java: Compilation failed: internal java compiler error
- [Solved] IDEA Start Porject Error: java: Compilation failed: internal java compiler error
- IDEA Compile Error: java Compilation failed internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error 解决办法
- [Solved] Error:java: Compilation failed: internal java compiler error
- [Solved] IDEA Error: java Compilation failed internal java compiler error
- [Solved] IDEA Compile Error: java: Compilation failed: internal java compiler error
- [Solved] IDEA java compile error: Error:java: Compilation failed: internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error
- [2022 New Solution] Error:java: Compilation failed: internal java compiler error
- [Solved] IDEA Run Error: Error:java: Compilation failed: internal java compiler error