Search code examples
windows-10spring-tool-suitelombokspring-tools-4

Lombok installation in Spring Tool Suite 4 for Windows


To install Lombok on one of my spring boot project on STS 4 in Windows 10 OS, I did the following steps:


  1. Added the lombok gradle dependency to build.gradle:

    compile 'org.projectlombok:lombok'

  2. Then to install the jar retrieved from building the above dependancy got a lombok-1.16.16.jar.

  3. To compile the jar did a right click on the jar -> Run as Java application.

  4. Lombok Installer appeared, but couldn't detect the IDE from the drives. So manually tried searching for the .exe file of STS4 (which I couldn't find)

So kindly help me find the .exe file of STS, so as to complete the installation


Solution

  • The Spring Tool Suite 4 by default has a name as SpringToolSuite4 which is the executable file. This file doesn't get detected in the Lombok installer. After googling it for quite a long time, all I could see were results of how to install the same of Mac or Linux. Finally, had to experiment a little. Following is the solution:

    1. Rename the SpringToolSuite4 (Application(.exe)) file and (Configuration settings (.ini)) to sts and now it is detectable in the Lombok installer.
    2. Complete the installation and restart STS and rebuild-clean your project and it works just fine.