Home > Software engineering >  I can't install lombok in Spring Tool Suite 4 ide on Ubuntu
I can't install lombok in Spring Tool Suite 4 ide on Ubuntu

Time:01-12

I'm trying to install lombok in the Spring Tool Suite 4 ide which is in the /opt folder on Ubuntu. The command: java -jar lombok.jar does not work because the opt folder requires privileges. enter image description here

I tried using the command suggested by the installation software: sudo java -jar lombok.jar I get the result:

sudo: java: command not found

Note: I have the SDKMAN software development kit manager installed to manage java versions.

CodePudding user response:

Because root does not have sdkman install. root can not get java.

You can do this:

sudo su -

cd /usr/lib/jvm

ln -s /home/YourUserName/.sdkman/candidates/java/current jdk

nano /root/.bashrc

# ADD This 
export JAVA_HOME=/usr/lib/jvm/jdk
export PATH=/usr/lib/jvm/jdk/bin:$PATH

# Ctrl   O save 
# Ctrl   X exit nano

exit

Then you can run sudo java -jar lombok.jar

CodePudding user response:

You can also simply search maven repository in the google. search for the project lombok and select the version then you will get the jar file to download.

or simply click on the below link to download

download the jar

  • Related