cmd中修改path 打开cmd 输入 set path=test输入 echo %path% 输出为test 此时原本的命令都用不了 重新打开cmd 输入你修改的环境变量命令 比如mvn 发现环境变量生效了 成功刷新