再Java21中运行报错
Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field ‘com.sun.tools.javac.tree.JCTree qualid’文章来源:https://www.toymoban.com/news/detail-715998.html
解决方法:Lombok和Java21不兼容文章来源地址https://www.toymoban.com/news/detail-715998.html
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>edge-SNAPSHOT</version> <!--这个版本是关键-->
</dependency>
// 必须从这个仓库才能找到【edge-SNAPSHOT】版本
<repositories>
<repository>
<id>projectlombok.org</id>
<url>https://projectlombok.org/edge-releases</url>
</repository>
</repositories>
到了这里,关于Java 21运行报错Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field ‘com.sun.tools.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!