Pages

Wednesday, March 12, 2014

Unable to install Maven: “JAVA_HOME is set to an invalid directory”

Sometimes when we try to run mvn -version command it gives the following error in the command prompt .

Solution:

ERROR: JAVA_HOME is set to an invalid directory. JAVA_HOME = "C:\Program Files\Java\jdk1.7.0_51\bin" .Please set the JAVA_HOME variable in your environment to match the location of your Java installation

JAVA_HOME should be set to C:\Program Files\Java\jdk1.7.0_51.  PATH should be set to include %JAVA_HOME%\bin.

Hope this helps.:)

No comments:

Post a Comment