java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled

Intellij IdeaIntellij Lombok-Plugin

Intellij Idea Problem Overview


After upgrade, Unable to run the application from intellij IDE.

Intellij version : IntelliJ IDEA 2020.3 (Community Edition) Build #IC-203.5981.155, built on December 1, 2020

lombok version : 0.32-EAP

Error :

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
  Your processor is: com.sun.proxy.$Proxy24
  Lombok supports: sun/apple javac 1.6, ECJ

Intellij Idea Solutions


Solution 1 - Intellij Idea

Using lombok 1.18.16 did not work for me. I added the argument below in the build process VM options in

-Djps.track.ap.dependencies=false

Setting:-

> Build, Execution, Deployment -> Compiler -> Shared build process VM > options

and it worked https://github.com/rzwitserloot/lombok/issues/2592

Solution 2 - Intellij Idea

This issue is introduced in IntelliJ IDEA 2020.3 (Community Edition) Build #IC-203.5981.155.

You can fix it by adding this dependency into your project -

Maven -


<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.16</version>
    <scope>provided</scope>
</dependency>

Gradle -

providedCompile group: 'org.projectlombok', name: 'lombok', version: '1.18.16'

Solution 3 - Intellij Idea

For the impatient one (like myself) add

-Djps.track.ap.dependencies=false

to 'Shared build process VM options:'

enter image description here

Solution 4 - Intellij Idea

I had the same issue here after updating my Intellij Community to 20.3. The issue could be solved by updating the lombok plugin to 1.18.16

Solution 5 - Intellij Idea

Perform this steps to resolve this issue -->

  1. Click on IntelliJ Idea near File Menu from header
  2. Open Preferences
  3. Click on Build, Execution, Deployment
  4. Go to Compile
  5. Inside the User-local build process VM options -> Add this command -Djps.track.ap.dependencies=false
  6. Apply the changes

Solution 6 - Intellij Idea

Intellij CE Version: 2020.3 Lombok issue fixed by simply updating POM dependency. Example,

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

Solution 7 - Intellij Idea

With this version:

  • Version: 2020.3
  • Build: 203.5981.155
  • 1 December 2020

I've got this message:

> ⚠ You aren't using a compiler supported by lombok, so lombok will not work and has been disabled


So,

I added lombok plugin in IntelliJ:

install lombok plugin

I enabled it: enter image description here

I downloaded the last lombok Jar: https://projectlombok.org/downloads/lombok.jar

And installed it manually: download lombok jar

Add it in Platform settings add lombok jar in platform settings

And, now, it works fine!


PS: The version of my project Lombok dependency is 1.18.8 while the one of the downloaded plugin installed jar in platform settings is 1.18.16.

Solution 8 - Intellij Idea

  • Go to IntelliJ | Preferences | Build, Execution, Deployment |
  • Compiler Find Build process VM options or Shared build process VM
  • options Add string -Djps.track.ap.dependencies=false into the text
  • box Hit save

Solution 9 - Intellij Idea

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled. Your processor is: com.sun.proxy.$Proxy27 Lombok supports: sun/apple javac 1.6, ECJ

Upgrade your lombok version by adding below dependencies for gradle, as this is the version supported by updated Intellij 2020.3:

compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'

Solution 10 - Intellij Idea

In my case, I had a dependency module running in the project that used another version of lombok. Another spring-boot version to be more precise. With it's BOM comes another lombok version.

version warning

Solution 11 - Intellij Idea

My project has lombok in version 1.18.16 yet intellij 2020.3 refused to compile my code and above answers did not help:(.

Eventually tweeking in settings->"build,execution,deployment"->compiler->"annotation processors" worked :). Make sure to enable "annotation processing" and "obtain processors from classpath" checkboxes .

screenshot

Solution 12 - Intellij Idea

Solved it by using the maven-compiler-plugin configuration and specify the annotationProcessorPaths as follows:

Note I also have mapstruct, so hence the extra paths.

inside build/plugins:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <annotationProcessorPaths>
            <path>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <version>${lombok.version}</version>
            </path>
            <path>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok-mapstruct-binding</artifactId>
              <version>${mapstruct-processor.version}</version>
            </path>
            <path>
              <groupId>org.mapstruct</groupId>
              <artifactId>mapstruct-processor</artifactId>
              <version>${mapstruct.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>

My dependencies:

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mapstruct</groupId>
      <artifactId>mapstruct</artifactId>
      <version>${mapstruct.version}</version>
    </dependency>

My properties:

    <java.version>11</java.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <mapstruct.version>1.4.2.Final</mapstruct.version>
    <mapstruct-processor.version>0.2.0</mapstruct-processor.version>
    <!-- Bumped version of lombok temporarily to avoid issues with IntelliJ 2020.3+ until we have upgraded to a more recent version of spring boot. -->
    <lombok.version>1.18.20</lombok.version>

Note: I override the lombok version to 1.18.20 since I'm still on an older version of spring boot which uses 1.18.12 under the hood...

Solution 13 - Intellij Idea

I had the same error and I solved updating IntelliJ to 2021.1.1 version: IntelliJ IDEA 2021.1.1 (Community Edition) Build #IC-211.7142.45, built on April 30, 2021

Solution 14 - Intellij Idea

For me, I disabled the bundled Lombok plugin. Then enabled it again and reloaded the maven project. Boomshakalaka.

Lombok 1.18.22

IDEA 2021.3 #IU-213.5744.223

Solution 15 - Intellij Idea

You need to enable the bundled plugin.

Since version 2020.3 the Lombok plugin is build-in, you don't need to download a separate plugin (which won't work anymore). Find it in installed plugins (not in marketplace) and simply enable it.

it's bundled1

That plugin doesn't have homepage link anymore and has a different description.

new plugin description

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSpartanView Question on Stackoverflow
Solution 1 - Intellij IdeaAshishView Answer on Stackoverflow
Solution 2 - Intellij IdeaAmit DusaneView Answer on Stackoverflow
Solution 3 - Intellij IdeaPankajView Answer on Stackoverflow
Solution 4 - Intellij IdeaVisualDigitsView Answer on Stackoverflow
Solution 5 - Intellij IdeaCodingBeeView Answer on Stackoverflow
Solution 6 - Intellij IdeaBharathiView Answer on Stackoverflow
Solution 7 - Intellij IdeavvaubanView Answer on Stackoverflow
Solution 8 - Intellij Ideasahil khuranaView Answer on Stackoverflow
Solution 9 - Intellij IdeavanshikamalhotraView Answer on Stackoverflow
Solution 10 - Intellij IdeaHuubView Answer on Stackoverflow
Solution 11 - Intellij IdeaSaginatioView Answer on Stackoverflow
Solution 12 - Intellij IdeaBitfullByteView Answer on Stackoverflow
Solution 13 - Intellij IdeaRodrigoView Answer on Stackoverflow
Solution 14 - Intellij IdeaenjinerdView Answer on Stackoverflow
Solution 15 - Intellij IdeaWojciech BelingView Answer on Stackoverflow