简体   繁体   English

Maven 未在 Windows JDK 11 上运行,显示未设置 JAVA_HOME

[英]Maven not running on windows JDK 11, it says JAVA_HOME is not set

This issue is driving me crazy, guys.这个问题让我发疯,伙计们。 Take a look.看一看。

I have downloaded and unzipped maven 3.6.3 on my Program Files folder, I set the environment variables properly, I think, but when I try to run:我已经在 Program Files 文件夹中下载并解压了 maven 3.6.3,我认为我正确设置了环境变量,但是当我尝试运行时:

在此处输入图片说明

As you can see in the following pictures, my JAVA_HOME is set right as it should be, pointing to a JDK 11:如下图所示,我的 JAVA_HOME 设置正确,指向 JDK 11:

在此处输入图片说明

在此处输入图片说明

I had no problem using that JDK until now for eclipse and maven inside eclipse.到目前为止,我在 eclipse 和 eclipse 中使用该 JDK 没有问题。 I've reinstalled Java already, reboot several times, but nothing seems to fix我已经重新安装了 Java,重新启动了几次,但似乎没有任何修复

My system had some misconfiguration and I cant understand why.我的系统有一些配置错误,我不明白为什么。 But to solve the problem I deleted the jdk folder, removed java from official uninstaller, donwloaded and installed OpenJDK 11 from this link and the problem was solved, maven now works:但是为了解决这个问题,我删除了 jdk 文件夹,从官方卸载程序中删除了 java,从这个链接下载并安装了 OpenJDK 11,问题解决了,maven 现在可以工作了:

在此处输入图片说明

Thank you guys for your help!谢谢你们的帮助!

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

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