how to configure lombok in eclipse luna

Solution 1:

Disclosure: I am one of the lombok developers. I might be biased :-)

I strongly suggest installing Lombok via executing the lombok jar: java -jar lombok.jar The spaces in the path might be a problem.

Also, you'll need to use lombok version 1.14.8 (or higher) to have Luna support.

Please check in the About Eclipse screen if lombok is installed correctly.

See also Cannot make Project Lombok work on Eclipse (Helios)

Solution 2:

Here is the complete steps to be followed, you wont see any issues.

1. Download Lombok Jar File - Its better to have a Maven/Gradle dependency in your application. The maven depency can be found here: https://mvnrepository.com/artifact/org.projectlombok/lombok

2. Start Lombok Installation -
Once the jar downloaded in Local repository, goto the jar location from command prompt and run the following command java -jar lombok-1.16.18.jar and we should be greeted by Lombok installation window provided by lombok like this.

3. Give Lombok Install Path - Now click on the “Specify Location” button and locate the eclipse.exe/STS.exe path under eclipse installation folder like this.

enter image description here

4. Finish Lombok Installation - Now we need to finally install this by clicking the “Install/Update” button and we should finished installing lombok in eclipse and we are ready to use its hidden power. Final screen will look like,

enter image description here

5. Please make sure to add below entry into the STS.ini file, if its not already there.

-vmargs -javaagent:lombok.jar

Note: After doing all this if this doesn't worked then make sure to change the workspace and build the code again. It will work.