Home > database >  mvn - is not recognized as an internal or external command in Windows 11
mvn - is not recognized as an internal or external command in Windows 11

Time:07-23

I have downloaded binary mvn file, extracted it and added the MAVEN_HOME system variable and %MAVEN_HOME%\bin to path. enter image description here

Update: I don't see the .cmd files after extraction. Files are present before extraction. Hidden files are enabled and when I create a .cmd file manually from mvn file, it still doesn't work. enter image description here

Note: I have installed maven atleast in 10 other machines in the past. But never stuck as badly.

CodePudding user response:

Solved it myself. Using the winRAR to extract the downloaded bin.zip file caused the problem. When accessed directly through winrar, the .cmd files (.bat in older version of maven) were present. enter image description here But after extracting to a folder, the files are missing. enter image description here

Root Cause: For security reasons, WinRAR is omitting .cmd and .bat files from extraction list by default. enter image description here

Using the default "Extract All.." option from right click menu resolved this.

  • Related