-1

I insalled maven in GCP windows server. when i execute a command output shows like below.

mvn -version

Output:

Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: C:\opt\apache-maven-3.8.5
Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_202\jre
Default locale: en_IN, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
'cmd' is not recognized as an internal or external command, operable program or batch file

Please anyone help me regarding this issue.

Thanks in advance.

  • Please take a look on [What is the reason for "X is not recognized as an internal or external command, operable program or batch file"?](https://stackoverflow.com/a/41461002/3074564) Then open a [command prompt](https://www.howtogeek.com/235101/), run `set path` and [edit] your question with the output of this command. Run next `%SystemRoot%\System32\reg.exe query HKCU\Environment /v Path` and `%SystemRoot%\System32\reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path` and add the output of these two commands also to your question. – Mofi May 31 '22 at 10:43
  • Then we know how __system__ and __user__ and __local__ `PATH` and how `PATHEXT` are defined on your PC and can tell you the necessary steps to fix __system__ or __user__ or __local__ `PATH`. I suppose `PATHEXT` is still defined as by default because most users corrupt only one of the `PATH` environment variables. – Mofi May 31 '22 at 10:47

0 Answers0