3
votes

I have a maven project which when i run it builds successfully but does not start the server instead it prints out the following "'cmd' is not recognized as an internal or external command, operable program or batch file.". i have actually tried re-installing netbeans but that doesn't seem to solve the problem. Any help would be highly appreciated.

2
What server you try to start? - Ishikawa Yoshi
glassfish server version 3.1.2 - Ayodeji
Do you try somthing like this tutorial netbeans.org/kb/docs/javaee/maven-entapp.html ? - Ishikawa Yoshi
i finally figured out a way around it, when i tried accessing 'cmd' from the command prompt manually, it gave me same error, so i had to edit the environment variables path to point to 'c:\windows\system32' then i restarted netbeans and tadaaaaaaa, it works perfectly. - Ayodeji
i didn't mention this variant before, because i never see the case where this variable is not defined) i think it's so obvious. But anyway it's so good that you solve this problem by yourself!. - Ishikawa Yoshi

2 Answers

6
votes

This not an issue with your IDE or in MAVEN.Check your "system32" is correctly defined in the PATH environment variable in windows.Before this verify your JAVA_HOME and M2_HOME paths are correct

Path = %SystemRoot%\system32;
0
votes

Add C:\Windows\System32 to your Path variable in environment variables and it should work.