现在正在测试将某些服务升级到 Java 17,因为 Java 17 已正式发布,但在编译 Gradle 7.2 Spring Boot 应用程序时遇到了以下问题:
> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
An exception has occurred in the compiler (17). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you. …Run Code Online (Sandbox Code Playgroud) 执行命令mvn clean package后出现以下错误:
Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x298bfadd) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x298bfadd
Run Code Online (Sandbox Code Playgroud)
我使用的是 JDK 17.0.1,据我所知,这是 idk 16 中的一个常见错误。有什么想法如何修复它吗?我在 Mac 上工作,我的 mvn 版本是 3.8.4
% echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Run Code Online (Sandbox Code Playgroud)