Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Lombok via its update site doesn't do anything #67

Open
candrews opened this issue Aug 2, 2022 · 1 comment
Open

Installing Lombok via its update site doesn't do anything #67

candrews opened this issue Aug 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@candrews
Copy link

candrews commented Aug 2, 2022

In Eclipse, I installed Lombok as documented at https://projectlombok.org/setup/eclipse using the update site, https://projectlombok.org/p2

After installation, in Eclipse I checked the About box and did not see Lombok. Also, Lombok isn't working as evidence by Lombok generated getters, for example, not being recognized as existing in Eclipse.

After stumbling around for a bit, I came across #14 which says how to specify arguments to Eclipse.

I therefore tried running Eclipse using the Lombok JVM arguments, like this:
flatpak run org.eclipse.Java -javaagent:/home/candrews/.var/app/org.eclipse.Java/eclipse/plugins/org.projectlombok.agent_1.18.24/lombok.jar

And now Lombok appears in Eclipse's About box and its working.

Can the Flatpak be improved so that installing Lombok via its update site works?

@francoisautin
Copy link

francoisautin commented Sep 27, 2023

It seems like the issue is worsened by the fact that the -javaagent cli argument seems to be ignored now

Running flatpak run org.eclipse.Java -javaagent:/home/fautin/.var/app/org.eclipse.Java/eclipse/plugins/org.projectlombok.agent_1.18.30/lombok.jar yields no result.

FIXED: The actual command is flatpak run org.eclipse.Java -vmargs -javaagent:/home/$USER/.var/app/org.eclipse.Java/eclipse/plugins/org.projectlombok.agent_A.B.C/lombok.jar where you replace user by your username and A.B.C by the lombok version number.

In order to avoid having to run eclipse from the CLI, you can write a custom .desktop file for your user:

  • $ cd ~
  • $ cp /var/lib/flatpak/exports/share/applications/org.eclipse.Java.desktop .
  • $ nano org.eclipse.Java.desktop (or with whichever text editor you prefer)
  • Edit the Exec= line by adding -vmargs -javaagent:/home/$USER/.var/app/org.eclipse.Java/eclipse/plugins/org.projectlombok.agent_A.B.C/lombok.jar between -- and @@ by letting spaces in between the markers
  • Optionally edit the Name= line to reflect the fact that this is NOT the original .desktop file (mine is Eclipse Java with Lombok)
  • $ mv ~/.local/share/applications/org.eclipse.Java.desktop ~/.local/share/applications/org.eclipse.Java.desktop.bak 2> /dev/null
  • $ mv org.eclipse.Java.desktop ~/.local/share/applications/

Now you should have a new icon in your app launcher which will automatically run eclipse with the proper arguments 😃

@Mailaender Mailaender added the bug Something isn't working label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants