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
Also had problems with lombok in eclipse oxygen.
My solution: returned from java version 8u144 to 8u141.
And I refer to lombok by adding this to my eclipse.ini:
-Xbootclasspath/c:/DEV/Tools/lombok-1.16.18/lombok.jar
-javaagent:/DEV/Tools/lombok-1.16.18/lombok.jar
Solution:
Install lombok 1.16.18 as instructed by lombok website. It's better Eclipse is close during installation.
Make sure Eclipse can start up properly. On the shortcut, change the properties, and fill in the "Start in" path and it will work as noted by Thomas and Fabiano.
Once Eclipse opens, update Maven on the project to solve compilation errors.
Now Lombok latest release works with Eclipse latest release.
For reference:
My Eclipse: Oxygen
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
My JRE/JDK: 1.8
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
lombok 1.16.18
Hello I solved that problem simply editing the lombok dependency in the pom.xml
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.16</version>
<scope>provided</scope>
</dependency>
This version seems to work whit java 8.
My env: java version "1.8.0_144"
Eclipse: Eclipse Java EE IDE for Web Developers. Version: Oxygen Release (4.7.0) Build id: 20170620-1800
Exit Eclipse(if it is open) and downloaded jar from https://projectlombok.org/download
execute command: java -jar lombok.jar
This command will open window as shown here https://projectlombok.org/setup/eclipse, install and quit the installer.
Add jar to build path/add it to pom.xml.
e.g. for Gradle build
annotationProcessor("org.projectlombok:lombok")
compileOnly("org.projectlombok:lombok")
Enable annotation processing
in the respective IDE.
That's it. It worked.
I did not change eclipse init script.Note: Read the note in following image regarding -vm options If you start Eclipse with a custom -vm parameter, you'll need to add:
-vmargs -javaagent:<path-to-lombok-jar>/lombok.jar
as parameter as well
Above steps works for Photon Release (4.8.0)
- Lombok v1.18.2
, eclipse: Oxygen.3a Release (4.7.3a)
- Lombok v1.18.0
and eclipse: Neon.3 Release (4.6.3)
- Lombok v1.18.2
lombok success screen:
fyi,
For JDK - 10 and 11 support:
Lombok version should be at least v1.18.4 (October 30th, 2018) or higher.
You can install lombok through command line very easily, ~/softwares/Eclipse.app/
path to your eclipse or sts app (this is on mac) but it will also work for different OS, and it will give you the successful output.
java -jar lombok.jar install ~/softwares/Eclipse.app/
Output:
Lombok installed to: /Users/temp/softwares/Eclipse.app
Had problems with Eclipse Oxygen, Java 1.9 and Lombok (on Mac OSX - windows/linux should be similar).
This is what I had to do:
lombok: 1.16.20
java -jar lombok.jar
/[some-folder-heirarchy]/Eclipse.app/Contents/Eclipse/eclipse.ini
Thereafter check to see if the updates have made it in eclipse.ini:
-javaagent:/[some_folder-hierarchy]/eclipse-oxygen/Eclipse.app/Contents/Eclipse/lombok.jar
There is only one line that is updated. That is a change from some of the earlier versions of lombok
where a bootclasspath
was also specified and / or the path to lombok.jar
was relative. Now it is an absolute path.
Bring up eclipse and you would see Lombok in action.
And do not forget to use the same Lombok
version in your maven
or any other dependency management tool.
Edit 1: I also used a different version of Lombok
in the maven POM
from the one that is installed in eclipse
and for the most part, things compiled but there were a few compile errors in eclipse
. Of course, things compiled successfully on the command line with maven
. So if you have project dependencies that force you to use different Lombok versions then be aware of such an eventuality. The crux is to have the same version installed in both eclipse
and in your project's dependency management (maven
etc.).