Lombok not working with STS

后端 未结 18 1948
我在风中等你
我在风中等你 2020-12-14 06:49

Although I love lombok, it gives too much problems while configuring sometimes, specially in Linux. When I was trying to install it, I was getting the following error:

相关标签:
18条回答
  • 2020-12-14 07:18

    Follow these steps:

    1. download lombok from https://projectlombok.org/download
    2. double click on lombok.jar and specify the path of your ide and click install.
    3. Restart your ide.
    4. clean your project. If you are using eclipse or sts, click on Project->clean..
    0 讨论(0)
  • 2020-12-14 07:20

    If you download the version of STS below and follow the set up. Lombok works with STS perfectly.

    Version: 4.7.0.RELEASE Build Id: 202006181331

    Copyright (c) 2007 - 2020 Pivotal, Inc. All rights reserved. Visit https://spring.io/tools

    This product includes software developed by the Eclipse Foundation https://www.eclipse.org

    This product includes software developed by the Apache Software Foundation https://www.apache.org

    Lombok v1.18.12 "Envious Ferret" is installed. https://projectlombok.org/

    0 讨论(0)
  • 2020-12-14 07:26

    I had this problem despite successfully installing lombok and restarting STS, so:

    • shutting down STS and
    • starting it

    worked (as opposed to restarting it). See this: http://codeomitted.com/setup-lombok-with-stseclipse-based-ide/

    0 讨论(0)
  • 2020-12-14 07:27
    • I have update the same on the following link.

    Lombok not generating getter and setter STS

    0 讨论(0)
  • 2020-12-14 07:28

    I have the same issue of lombok not working on STS. For me root cause was that I have spaces in my STS installation directory

    -javaagent:E:\Installation Directory with spaces\sts-X.X\lombok.jar
    

    in STS.iniand after changing it to relative path

    -javaagent:lombok.jar
    

    lombok started working.

    0 讨论(0)
  • 2020-12-14 07:29

    It worked for me when I push the -javaagent arg to the top of the varargs list and restart the STS. By default Lombok adds this argument at the end in the ini file when you install. Eg:

    -vmargs
    -javaagent:lombok.jar
    
    0 讨论(0)
提交回复
热议问题