boofangfang001 2024-04-01 09:57 采纳率: 0%
浏览 505

但是编译时一直报错:Compilation failure不允许在使用 --release 时从系统模块 java.base 导出程序包,如何解决?

系统java版本:
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

另外pom里已经配置了:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <arg>--add-exports</arg>
            <arg>java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED</arg>
          </compilerArgs>
        </configuration>
</plugin>

但是编译时一直报错:
Compilation failure
不允许在使用 --release 时从系统模块 java.base 导出程序包:

求技术达人们帮忙看看

  • 写回答

4条回答 默认 最新

  • Destin.256 2024-11-28 19:02
    关注

    请问解决了,求回答

    评论

报告相同问题?

问题事件

  • 创建了问题 4月1日