阿帕奇Maven的安装"“MVN”不被识别为一个内部或外部命令"之后OS设置环境变量? [英] Apache Maven install "'mvn' not recognized as an internal or external command" after setting OS environmental variables?

查看:373
本文介绍了阿帕奇Maven的安装"“MVN”不被识别为一个内部或外部命令"之后OS设置环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照官方的安装说明这里适用于Windows XP。但有时当我执行 MVN --version ,我收到错误消息,

I've followed the official installation instructions here for Windows XP. But sometimes when I execute mvn --version, I receive the error message,

MVN未识别为一个内部或外部命令

'mvn' not recognized as an internal or external command

我甚至重新启动我的机器几次,但操作系统并不总是承认maven的命令。但是,当我既可以执行, CD%M2_HOME% CD%M2%它带给我到安装目录。我也做了一定的用户变量 M2 添加到路径系统变量。

I've even rebooted my machine a couple times, but the OS does not always recognize the maven command. But when I execute either, cd %M2_HOME%, or cd %M2% it brings me to the installation directory. I've also made sure to add the user variable M2 to the Path system variable.

那么,是什么原因呢?

So, what gives?

推荐答案

办法解决将移动 M2 来自的用户的变量的系统的变量

Way around would be moving M2 from user variables to system variables

这篇关于阿帕奇Maven的安装"“MVN”不被识别为一个内部或外部命令"之后OS设置环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆