Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA tells me "Error:java: Compilation failed: internal java compiler error idea"

When I compile a Java project using IntelliJ IDEA, it gives me the following output (and error):

Information:Eclipse compiler 4.6.2 was used to compile java sources Information:Module "sinoWeb" was fully rebuilt due to project configuration/dependencies changes Information:2017/3/23 11:44 - Compilation completed with 1 error and 0 warnings in 5m 32s 949ms Error:java: Compilation failed: internal java compiler error 

I'm quite confused confused by this! Below are my settings:

enter image description

enter image description here

like image 273
ieatczp Avatar asked Mar 23 '17 03:03

ieatczp


People also ask

How do I fix a compilation error in Intellij?

Invalidate Caches/Restart. Delete user config. Create a new project (trying to see if my current project files somehow all got messed up, but the problems persist even with new projects) Uninstall + Reinstall.

How do you fix a compilation error in Java?

Mismatched brackets If the brackets don't all match up, the result is a compile time error. The fix to this compile error is to add a leading round bracket after the println to make the error go away: int x = 10; System.

Why is Intellij not showing compilation errors?

In "Settings" --> Build, Execution, Deployment --> "Compiler" check the checkbox "Build project automatically". This will immediately show any compile errors in the project tree.

How do I know which Intellij Compiler I have?

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment| Compiler.


2 Answers

  1. On Intellij IDEA Ctrl + Alt + S to open settings.
  2. Build, Execution, Deployment -> Compiler -> Java Compiler
  3. choose your java version from Project bytecode version
  4. Uncheck Use compiler from module target JDK when possible
  5. click apply and ok.
like image 58
Musab Bozkurt Avatar answered Sep 19 '22 19:09

Musab Bozkurt


I solved this issue by increasing the default value(700) of Build process heap size on IntelliJ's compiler settings.

enter image description here

like image 40
sezerug Avatar answered Sep 17 '22 19:09

sezerug