Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am currently seeing a weird problem in Windows 8 installed on my laptop. I have copied "apache maven" to the C:\Program Files\Apache Software Foundation folder. I have set the JAVA_HOME, M2_HOME environment variables as per instructions and added the Maven bin folder to the path.

C:\Users\vikram>echo %M2_HOME%

C:\Program Files\Apache Software Foundation\apache-maven-2.2.1

C:\Users\vikram>echo %PATH%
C:\Program Files\Apache Software Foundation\apache-maven-2.2.1\bin;C:\Perl64\sit
e\bin;C:\Perl64\bin;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Dr
iver;;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Clie
nt\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\
WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Compon
ents\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Pro
gram Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program File
s (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\I
ntel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;
C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Progr
am Files\Java\jdk1.7.0_15\bin;C:\Program Files\Apache Software Foundation\apache
-ant-1.8.4\bin

But when I try to access "mvn" at the command prompt, it gives me the error as follows:

C:\Users\vikram>mvn

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

The only thing that I did differently is installed cygwin recently. From cygwin, I am able to access the "mvn" bin

vikram@olympus ~
$ mvn --version
cygwin warning:
  MS-DOS style path detected: C:\Program Files\Apache Software Foundation\apache-maven-2.2.1/boot/
  Preferred POSIX equivalent is: /cygdrive/c/Program Files/Apache Software Foundation/apache-maven-2.2.1/boot/
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.7.0_15
Java home: C:\Program Files\Java\jdk1.7.0_15\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8" version: "6.2" arch: "amd64" Family: "windows"

Why am I not able to access the "mvn" binary from the Windows command prompt?

share|improve this question

migrated from stackoverflow.com Mar 3 '13 at 9:08

This question came from our site for professional and enthusiast programmers.

    
Gawd, I hate Intel software. –  Hans Passant Feb 27 '13 at 23:44

1 Answer 1

I used Rapid Environment Editor, started as an Administrator, and put these variables into my System path, and this problem went away.

For some reason, when I added the the JDK, JRE, and Maven bin folders to my Path through the Windows utility, it didn't work. Rapid Environment Editor told me that the variables were not valid or I did not have access to them. Windows 8 seems to be really picky about administrator rights and I guess they didn't think that through very well.

Just be sure to start Rapid Environment Editor as an administrator, and re-open your command windows when you save your changes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.