简体   繁体   English

'cmd'未被识别为内部或外部命令,可操作程序或批处理文件

[英]'cmd' is not recognized as an internal or external command, operable program or batch file

When I build my project in netbeans me it shows: 当我在netbeans中构建我的项目时,它显示:

'cmd' is not recognized as an internal or external command,
 operable program or batch file.` 

I'm using jdk 8 and maven 3.3. 我正在使用jdk 8和maven 3.3。 My path system variable is: 我的路径系统变量是:

%SystemRoot%\system32;%SystemRoot%;D:\POS\apache-maven-3.3.3-bin\apache-maven-3.3.3\bin;

到目前为止,我知道这不是您的IDE问题 。检查您的“system32”是否在PATH环境变量中正确定义。

Path = %SystemRoot%\system32;

you can get it worked in anyone of below ways 你可以通过以下方式使用它

  1. Set path to system32 c:\\windows\\system32 instead of %SystemRoot%\\system32 将路径设置为system32 c:\\windows\\system32而不是%SystemRoot%\\system32
  2. Go to system32 folder then search and find cmd.exe 转到system32文件夹,然后搜索并找到cmd.exe
  3. Use command instead of cmd.exe 使用command而不是cmd.exe

We can get cmd.exe with already setted System root path in very simple way 我们可以通过非常简单的方式获取已经设置的系统根路径的cmd.exe

  1. simply copy cmd.exe from Windows/System32 folder and paste it in directory where it is needed. 只需从Windows / System32文件夹中复制cmd.exe并将其粘贴到需要它的目录中。

One variable named Path was already set but i created a new variable which is PATH so it replaced the Path variable so Path = %SystemRoot%\\system32; 一个名为Path变量已经设置但我创建了一个新变量PATH因此它替换了Path变量,因此Path = %SystemRoot%\\system32; got deleted. 被删除了。

SO the conclusion is you were trying to install java or maven and you replaced Path with PATH and its gone. 所以结论是你试图安装java或maven,你用PATH替换了Path并且它已经消失了。

So set the SystemRoot path in environment variable something like below. 因此,在环境变量中设置SystemRoot路径,如下所示。

PATH = %JAVA_HOME%\\bin;%M2_HOME%\\bin;%SystemRoot%\\system32; PATH = %JAVA_HOME%\\bin;%M2_HOME%\\bin;%SystemRoot%\\system32;

暂无
暂无

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

相关问题 CMD/PowerShell: 'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件 - CMD/PowerShell: 'javac' is not recognized as an internal or external command, operable program or batch file SDK 安装 cmd 错误:'source' 不是内部或外部命令、可运行程序或批处理文件 - SDK installation cmd error: 'source' is not recognized as an internal or external command, operable program or batch file 错误 -'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件 - Error -'javac' is not recognized as an internal or external command, operable program or batch file VSCode 'java' 不是内部或外部命令,也不是可运行的程序或批处理文件 - VSCode 'java' is not recognized as an internal or external command, operable program or batch file 错误 - jar 不是内部或外部命令、可运行的程序或批处理文件 - Error - jar is not recognized as an internal or external command, operable program or batch file 'jar' 不是内部或外部命令、可运行程序或批处理文件错误 - 'jar' is not recognized as an internal or external command, operable program or batch file error 'appletviewer' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'appletviewer' is not recognized as an internal or external command, operable program or batch file 'wsgen'不被识别为内部或外部命令,可操作程序或批处理文件 - 'wsgen' is not recognized as an internal or external command, operable program or batch file 'scomp' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'scomp' is not recognized as an internal or external command, operable program or batch file 'mvn' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'mvn' is not recognized as an internal or external command, operable program or batch file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM