Unable to install Maven: "JAVA_HOME is set to an invalid directory"

Posted by hello_world_infinity on Stack Overflow See other posts from Stack Overflow or by hello_world_infinity
Published on 2009-07-26T08:44:15Z Indexed on 2012/08/29 15:38 UTC
Read the original article Hit count: 275

Filed under:
|

I followed the Maven tutorial to the letter but I still can't get Maven installed.

When I run the following in command prompt:

E:\Documents and Settings\zach>mvn --version

I get:

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

I navigated to the maven install folder and ran mvn --version and got:

E:\java resources\apache-maven-2.2.0\bin>mvn --version
ERROR: JAVA_HOME is set to an invalid directory.
JAVA_HOME = "E:\Sun\SDK\jdk\bin"
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation

but when I run java -version I get:

java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)

So I do have Java installed. Anyone know what the problem is?

© Stack Overflow or respective owner

Related posts about java

Related posts about maven-2