sidkool3k
sidkool3k

Reputation: 43

Unable to install maven in windows xp

I have installed Maven3.04 as described in the steps found at:

http://maven.apache.org/download.html

I'm running an XP machine. I created the user variable and added the bin path to the path variable. However, when I try to run the mvn --version command to verify it is installed correctly I get the following error:

'mvn' is not recognized as an internal or external command

However, if I use the command as follows I get the expected result:

C:\maven\apache-maven-3.0.4\bin>mvn --version

Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: C:\maven\apache-maven-3.0.4
Java version: 1.6.0_11, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_11\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"

Am i missing something out..???

Upvotes: 0

Views: 1998

Answers (2)

Peter Lawrey
Peter Lawrey

Reputation: 533870

In Windows and Linux you can only run programs which are in your PATH (unless you give the directory as well) On Windows, the current directory is implicitly in your path, On linux it is not.

Once you have added the maven bin directory to your path and restarted any windows which this needs to be added to you will be able to run mvn

Upvotes: 0

kofemann
kofemann

Reputation: 4423

Obviously, your PATH variable is not set. Try to set it to:

 PATH=%PATH%;C:\maven\apache-maven-3.0.4\bin

Upvotes: 4

Related Questions