简体   繁体   English

为什么我的JAVA_HOME指向jre而不是jdk?

[英]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:我想使用 mvn 在我的 manjaro 系统上编译一个项目,每次我都会收到这个错误:

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/在这里找到这个: https://www.debugpoint.com/2021/02/install-java-arch/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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