IntelliJ - Use JDK 11 and Eclipse Compiler

charles Lgn :

I use IntelliJ 2018.3 and I need to use JDK 11.

The project compile on Eclipse (the Eclipse compiler) but not on IDEA (the Javac compiler)

enter image description here

So I decide to use Eclipse compiler on IDEA (Eclipse compiler 4.7.2) but I have always this error : enter image description here

Is there any solution to compile my programm on IntelliJ with the Eclipse compiler and if yes, How can I do that ?

CrazyCoder :

Use JDK 9 or lower, it's not supported for Java 10 and 11 yet: https://youtrack.jetbrains.com/issue/IDEA-190791 (Eclipse compiler specific limitation).

You can increase the heap size of the JVM running the build process and switch back to javac compiler instead of using Eclipse compiler:

build process heap size

This should fix the first error.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=74928&siteId=1