Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to compile in Intellij - Error:java: exporting a package from system module jdk.compiler is not allowed with --release

I am working on one project in IntelliJ IDEA. I loaded it from a github repository (Check out from version control on the splash screen-> git -> paste the url). I have no errors in my code, but when I try to compile I get the following message:

Error:java: exporting a package from system module jdk.compiler is not allowed with --release

I'm a beginner in working with Intellij, and I have no idea what this message means. Any help? I am using JDK 11

like image 497
Ibrahim Filandra Avatar asked Oct 30 '18 00:10

Ibrahim Filandra


2 Answers

File > Settings > Java Compiler

Uncheck the button next to "Use 'release' option...

enter image description here

like image 190
smac89 Avatar answered Nov 06 '22 04:11

smac89


In Intellij IDEA Go to File >> Settings >> Build,Execution,Deployment >> Compiler >> Java compiler and Uncheck "Use 'release' option for cross-compilation..."

like image 40
Ana Gabriela Guzman Avatar answered Nov 06 '22 03:11

Ana Gabriela Guzman