Ibrahim7
Ibrahim7

Reputation: 113

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

Upvotes: 6

Views: 6519

Answers (2)

smac89
smac89

Reputation: 43206

File > Settings > Java Compiler

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

enter image description here

Upvotes: 15

Ana Gabriela Guzman
Ana Gabriela Guzman

Reputation: 51

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

Upvotes: 2

Related Questions