0

Followed all the instructions on http://maven.apache.org/download.cgi

When I run 'mvn --version' in cmd, I get ........

Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)

Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin..

Java version: 1.7.0_03, vendor: Oracle Corporation

Java home: C:\Program Files\Java\jdk1.7.0_03\jre

Default locale: en_US, platform encoding: Cp1252

OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

The system cannot find the path specified.

I have tried to troubleshoot it myself. Followed these instructions too Installing maven on windows 7 64bit

1) navigate in explorer to the Maven directory 2) go to a dir IN the bin 3) copy the address in the address bar(must end with bin) 4) go to Start and type in "env" 5) Select "edit the system evironment variables" 6) find the PATH variable which must also have an existing value for Java as Maven needs Java. 7) append a ; + paste the path.

8) restart to update system 9) run "mvn install" in the cli.

I still get the same error.

PS: Here is my Path %M2_HOME%\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Java\jdk1.7.0_03;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;%M2%

Community
  • 1
  • 1
femi igun
  • 3
  • 1
  • 4
  • What happens when you specify a full path for mvn, i.e. `C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin\mvn.bat --version`? – Alexander Pogrebnyak Mar 13 '13 at 23:20
  • That error message is the last line of the console output? Does it tell you what the path is? – parsifal Mar 13 '13 at 23:21
  • Try closing the cmd window , sometimes maven chocks on white spaces ... – Shmil The Cat Mar 13 '13 at 23:32
  • @AlexanderPogrebnyak It looks like this >> C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin>mvn.bat --version Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000) Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin\.. Java version: 1.7.0_03, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_03\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" The system cannot find the path specified. C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin> – femi igun Mar 16 '13 at 00:13
  • @AlexanderPogrebnyak Hope that line made sense. Basically I got the same output + C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin> which to my understanding means there's nothing wrong with the maven path but I could be wrong. What do you think? – femi igun Mar 16 '13 at 00:27
  • @parsifal it doesn't tell me what the path it is, that's all I got back. i found it strange too and I've tried it several times. – femi igun Mar 16 '13 at 00:30
  • @ShmilTheCat I haave restarted the console several times to no avail, same problem. – femi igun Mar 16 '13 at 00:30
  • What is the %M2% at the end? – mezzie Mar 18 '13 at 16:35
  • @mezzie I added it because one of the tutorials I followed online suggested it. I have removed it now and it's still the same. – femi igun Mar 23 '13 at 13:50
  • I think I found a solution. I visited this page http://stackoverflow.com/questions/13316682/windows-cmd-exe-the-system-cannot-find-the-path-specified?answertab=active#tab-top – femi igun Mar 23 '13 at 15:12
  • Led me to http://carol-nichols.com/2011/03/the-system-cannot-find-the-path-specified/ I even installed http://technet.microsoft.com/en-us/sysinternals/bb896645 – femi igun Mar 23 '13 at 15:13

1 Answers1

1

If you are getting error "The system cannot find the path specified" on executing other program/commands in Command Prompt than it is likely that path of a program which is set to autorun from cmd.exe has been changed. You can trace the autorun program using following registry location: HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Modify the AutoRun entry in RegEdit to correct path and then retry the command in new cmd window.

san1deep2set3hi
  • 4,904
  • 1
  • 23
  • 23
  • Thanks! it worked for me. NOTE: For me, I couldn't find "Command Processor" key in the specified registry path (in windows registry) as said above. I did a search in the registry and found it under another folder. – Pavan G R Jun 04 '21 at 02:02