class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment”?


Are you having problems with the issue “java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment“? How to fix it? In today’s article, I will provide solutions for you to solve the issues. Please follow the below steps to get the problem resolved now

java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment

When you work with JAVA, you may get the issue java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment. Don’t worry, we are here to provide you solutions in order to resolve your problem.

To Solve java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment Error To solve this error Switch to at least the 1.18.20 version of Lombok. The second solution is to This error disappears after I upgrade to Java 15.

Solution 1: Update Lombok

This error can be fixed by switching to Lombok’s 1.18.20 version.

<dependency>
  <groupId>org.projectlombok</groupId>
  <artifactId>lombok</artifactId>
  <version>1.18.20</version>
</dependency>

Solution 2: Upgrade to Java 15

In my case, the error was still present with Java 16 and 1.18.20. When I downgrade to Java 15, it disappears.

Final words

The above are useful solutions that can help you fix “java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment” problem, if you can’t solve it well. Please leave a message.



Source link