系统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 导出程序包:
求技术达人们帮忙看看