Java: compilation failed: internal java compiler error when idea compiles the project
java: compilation failed: internal java compiler error
There are basically two root causes, one is the JDK version problem and the other is the stack shortage problem. This time, I am caused by the stack shortage;
1. JDK version problem
Check whether the JDK version is normal. Check both the idea configuration and the project configuration. If it does not meet the requirements, change to the JDK version of your own machine. My JDK is 1.8, so it is all changed to 1.8;
① JDK configuration in idea
File -> Setting -> Build,Execution,Deployment -> Compiler -> Java Compiler
② JDK configuration for project
File -> Project Structure-> Project Settings -> Project
③ JDK configuration of project
File -> Project Structure-> Project Settings -> Modules -> Project name
note that if there are multiple projects, each one should be changed
2. The project is too large, the build process heap is small, and the stack is insufficient during construction
This requires changing the size of the generated process heap
setting–> Build,Execution,Deployment–> Compiler –> User local build process heap size (Mbytes)
here is user local build process heap size (Mbytes). Different versions may not be consistent, but they should be very different. The original default is 700, but it is generally changed to 1024, which is enough. You can’t add it again
Note:
after the JDK version is changed, it is recommended to clear the cache and restart
file – > Invalidate Caches/Restart
Read More:
- [Solved] IDEA Start Porject Error: java: Compilation failed: internal java compiler error
- [Solved] java: Compilation failed: internal java compiler error
- IDEA Compile Error: java Compilation failed internal java compiler error
- [Solved] IDEA java compile error: Error:java: Compilation failed: internal java compiler error
- IntelliJ idea compilation error: Error:java : Compilation failed: internal java compiler error
- [Solved] Errorjava Compilation failed internal java compiler error
- [Solved] 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 解决办法
- Compilation failed: internal java compiler error[How to Solve]
- [Solved] IDEA Compile Error: java: Compilation failed: internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error
- Errorjava Compilation failed internal java compiler error [Solved]
- [Solved] IDEA Error: java Compilation failed internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error
- [Solved] IDEA Run Error: Error:java: Compilation failed: internal java compiler error
- [Solved]Error:java: Compilation failed: internal java compiler error
- Java Error | Error:java: Compilation failed: internal java compiler error
- [Solved] IDEA Compile Error: Error:java: Compilation failed: internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error