简体   繁体   中英

Why does my JAVA_HOME point to jre instead of jdk?

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?

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM