I installed maven in Ubuntu 22.04 and I am getting the next error when I try a mvn clean install command:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
My JAVA_HOME has the next value:
echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64/bin/
Am I missing something?
Thanks!
JAVA_HOME needs to be one level up - /usr/lib/jvm/java-11-openjdk-amd64
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