简体   繁体   中英

Which JDK version can I use to support Lombok version 1.16.16?

I have the following dependency in pom.xml

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <optional>true</optional>
    <version>1.16.16</version>
</dependency>

When I run mvn clean install I get the following error:

Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I found many articles which suggest that I should either upgrade the Lombok version or I should use JDK 8 . I am running JDK 8 but still not able to fix this error. Can someone tell me the exact JDK version that I should use in order to get rid of this error?

Dependency will help you getting that jar. Since Lombok works while code compilation you need to install the Lombok jar

Refer to this link for installation of Lombok in your IDE

如果您使用 Intellij,则需要安装插件 Lombok

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM