简体   繁体   English

无法在 Intellij 中编译 - 错误:java:不允许使用 --release 从系统模块 jdk.compiler 导出包

[英]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.我正在 IntelliJ IDEA 中开展一个项目。 I loaded it from a github repository (Check out from version control on the splash screen-> git -> paste the url).我从 github 存储库加载它(从初始屏幕上的版本控制中查看 -> git -> 粘贴 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错误:java:不允许使用 --release 从系统模块 jdk.compiler 导出包

I'm a beginner in working with Intellij, and I have no idea what this message means.我是 Intellij 的初学者,我不知道这条消息是什么意思。 Any help?有什么帮助吗? I am using JDK 11我正在使用 JDK 11

File > Settings > Java Compiler文件>设置> Java 编译器

Uncheck the button next to "Use 'release' option...取消选中“使用'发布'选项旁边的按钮...

在此处输入图片说明

在 Intellij IDEA 中,转到 File >> Settings >> Build,Execution,Deployment >> Compiler >> Java compiler 并取消选中“Use 'release' option for cross-compilation...”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 --release 不允许从系统模块导出 package - Exporting a package from system module is not allowed with --release Module jdk.compiler does not export com.sun.tools.javac.util..编译时报错 - Module jdk.compiler does not export com.sun.tools.javac.util.. Compile time error 环境(在模块 jdk.compiler 中),因为模块 jdk.compiler 不会将 com.sun.tools.javac.processing 导出到未命名的模块 - Environment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module 获取值为 Class<!--?--> 使用 jdk.compiler 模块进行注释 - Get value as Class<?> for an Annotation using the jdk.compiler module Java, Intellij IDEA 问题 Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - Java, Intellij IDEA problem Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED 模块 jdk.compiler 不会“打开 com.sun.tools.javac.processing” - module jdk.compiler does not "opens com.sun.tools.javac.processing" Lombok 访问 jdk.compiler 的内部包与 Java-16 不兼容 - Lombok's access to jdk.compiler's internal packages incompatible with Java-16 Java 11 将 jdk.compiler/com.sun.tools.javac 类包含到项目中 - Java 11 include jdk.compiler/com.sun.tools.javac classes into project 模块 jdk.compiler 不会“打开 com.sun.tools.javac.processing”到未命名的模块 @4bae33a6 - module jdk.compiler does not “opens com.sun.tools.javac.processing” to unnamed module @4bae33a6 Intellij 编译错误:java:错误:不支持发布版本 5 - Intellij compile error: java: error: release version 5 not supported
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM