Drashti Pandya
Drashti Pandya

Reputation: 358

'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:

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

I'm using jdk 8 and 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;

Upvotes: 13

Views: 110984

Answers (6)

malinda ilankoon
malinda ilankoon

Reputation: 1

to solve this problem add "system32" to your system environment variables (and user environment variables as well, add to both just in case)

for me this was the link

C:\Windows\system32

Upvotes: -1

Chadee Fouad
Chadee Fouad

Reputation: 2948

And easy workaround without using the environment variables path is to put the full path to the exe file as shown in the example below. First command doesn't work...Second works after putting the full location.

enter image description here

Upvotes: 0

Alien
Alien

Reputation: 15898

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; got deleted.

SO the conclusion is you were trying to install java or maven and you replaced Path with PATH and its gone.

So set the SystemRoot path in environment variable something like below.

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

Upvotes: 2

Arshad Ali
Arshad Ali

Reputation: 93

We can get cmd.exe with already setted System root path in very simple way

  1. simply copy cmd.exe from Windows/System32 folder and paste it in directory where it is needed.

Upvotes: 1

Sasikumar Murugesan
Sasikumar Murugesan

Reputation: 4518

you can get it worked in anyone of below ways

  1. Set path to system32 c:\windows\system32 instead of %SystemRoot%\system32
  2. Go to system32 folder then search and find cmd.exe
  3. Use command instead of cmd.exe

Upvotes: 5

orvi
orvi

Reputation: 3340

So far I understand this is not your IDE issue.Check your "system32" is correctly defined in the PATH environment variable .

Path = %SystemRoot%\system32;

Upvotes: 22

Related Questions