I have followed the tutorial here http://projectlombok.org/
but after adding import and @Data
nothing happens.
Does it work on eclipse helios ?
Eclipse 2020-12 (Eclipse 2020-12 Java) does not support Lombok. It runs fine, but the IDE shows errors for all Lombok generates getters/setters. The previous version of Eclipse work fine. You have to install lombok on your installation, otherwise Eclipse will not be able to handle the Lombok-Annotations.
Adding the Lombok Plugin in IDE (Eclipse) Downloaded jar from https://projectlombok.org/download or use the jar which is downloaded from your maven build. Execute command in terminal: java -jar lombok. jar. This command will open window as show in the picture below, install and quit the installer and restart eclipse.
You not only have to add lombok.jar to the libraries, but also install it by either double-clicking the lombok jar, or from the command line run java -jar lombok.jar
. That will show you a nice installer screen. Select your Eclipse installation and install.
Afterwards, you can check if the installer has correctly modified your eclipse.ini:
-vmargs ... -javaagent:lombok.jar -Xbootclasspath/a:lombok.jar
If your Eclipse was already running, you have to Exit Eclipse and start it again. (File/Restart is not enough)
If you are starting Eclipse using a shortcut, make sure that either there are no command line arguments filled in, or manually add -javaagent:lombok.jar -Xbootclasspath/a:lombok.jar
somewhere after -vmargs
.
Recent editions of Lombok also add a line to the About Eclipse screen. If Lombok is active you can find a line like 'Lombok v0.11.6 "Dashing Kakapo" is installed. http://projectlombok.org/' just above the line of buttons.
If for some reason, usually related to customized eclipse builds, you need to use the full path, you can instruct the installer on the command line to do so:
java -Dlombok.installer.fullpath -jar lombok.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With