Lombok problems with Eclipse Oxygen

后端 未结 20 828
南方客
南方客 2020-12-02 16:40

I upgraded recently to the new Eclipse version (Oxygen). I downloaded the lombok.jar from the website and installed it. This is how the eclipse.ini looks like a

相关标签:
20条回答
  • 2020-12-02 17:31

    If you have successfully installed Lombok and still facing the problem then right click on your project > maven > update project this should work.

    0 讨论(0)
  • 2020-12-02 17:33

    If restarting Eclipse doesn't help. You have to quit the application and make sure to kill all running java processes. That worked for me.

    (Eclipse Oxygen 4.7.1a, OpenJDK 1.8.0_151-b12)

    0 讨论(0)
  • 2020-12-02 17:35

    follow below steps to fix lombok issue in eclipse

    1. First download the lombok jar ( add to pom , it will download . u can run from that location(from your maven repository location)
    2. run jar from you maven repo location (java -jar lombok.jar)
    3. select ur eclipse.exe location and install.
    4. Add jar to maven/class path

    After this you will able to see these below lines in eclipse.ini file

    -javaagent:locaton of lombok.jar
    -Xbootclasspath/a:lombok.jar

    Note - if any line missing after follow these steps then add into your eclipse.ini and enjoy ur work.

    0 讨论(0)
  • 2020-12-02 17:36

    For Linux/Ubuntu users who are launching Eclipse from a launcher (a .desktop file) that is locked to your launcher, and your Help --> About dialog doesn't show lombok is installed:

    1. Close Eclipse
    2. Unlock Eclipse from your launcher
    3. Start Eclipse from the .desktop application
    4. Verify "Help --> About" indicates lombok is installed (scroll down)
    5. Lock to your launcher again

    It seems this works due to some issue with applications 'lock to launcher', and it's the unlock/lock process that fixes it.

    (Thanks to cardamon's comment here that pointed me to this solution)

    0 讨论(0)
  • 2020-12-02 17:39

    I am using STS. After performing installation of lombok.jar shown above, need to perform following task. STS -> Project -> Properties -> Java Compiler -> Annotation Processing -> Enable Annotation Processing. See here

    0 讨论(0)
  • 2020-12-02 17:40

    I had exactly the same problem with Alex. My eclipse version is

    Version: Oxygen.1a Release (4.7.1a) Build id: 20171005-1200

    I installed lombok 1.16.18, after checking it was already installed and also javaagent line was added to my eclipse.ini file.

    Every thing was fine except that there are compilation errors where getter is called in the project. It's awkward but I fixed by :

    1. Cleaning project

    2. Building project

    3. Restarting eclipse a few times

    Nothing else.

    0 讨论(0)
提交回复
热议问题