0

I want to compile a project on my manjaro system using mvn and every time I get this error:

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

Can somebody help?

  • FYI, this error is thrown in all cases when `JAVA_HOME` _does not_ point to a JDK installation including the case when it points to a non-existing folder. – Alex Feb 11 '22 at 12:50
  • @Alex yes, but there was both java jdk and jre already installed on my system – masterjoda99 Feb 17 '22 at 14:38

1 Answers1

1

Found the Solution myself:

sudo archlinux-java set <target java package name>

For Example:

sudo archlinux-java set java-15-jdk

Found this here: https://www.debugpoint.com/2021/02/install-java-arch/