java - Unable to install Maven on Windows: "JAVA_HOME is set to an invalid directory" -
I followed this letter but I still can not install Maven on Windows.
When I run the following in a command prompt:
e: \ documents and settings \ zach> mvn --version
me Getting:
'MVN' is not recognized as an internal or external command, operative program or batch file.
I navigated to the Maven install folder and went to mvn --version
and found:
e: \ Java resource \ Apache-maven-2.2.0 \ bin & gt; Mvn --version Error: JAVA_HOME is set to an invalid directory JAVA_HOME = "E: \ Sun \ SDK \ jdk \ bin" To match the location of your Java installation, set the JAVA_HOME variable in your environment
< / Pre>But when I
java - Java version (1.6.0_14-B80) Java Hotspot (TM) client VM (build 14.0) -b16, mixed mode)
So I have Java installed, anyone knows what the problem is?
Problems have to be done on their own way.
- Make sure that the directory "e: \ Java resource \ Apache-Maven -2.2.0 \ bin" is on your command search path.
-
Ensure that the JAVA_HOME variable refers to home directory for your Java installation if you execute Java from "e: \ son \ sdk \ jdk \ bin" If necessary, then the JAVA_HOME variable needs to point to "E: \ Sun \ SDK \ jdk".
NB: JAVA_HOME does not want "\ Bin" 1 .
-
Finally, make sure you have not inserted the semicolon in the JAVA_HOME variable 2 .
NB: JAVA_HOME should be the name of a single directory, not a list of directories named "PATH-like", separated by semicolons.
Also keep in mind that you may have problems if you have ignored this advice in the instructions about the spaces in the main pathnames.
"Many cross-platform tools like maven, can face problems when there are space characters in important pathmarks ."
" You need to install Java SDK (such as from the Oracle's download site), and you should place it in the path name without any spaces, such as c: \ j2se1.6. ''
"You need to open Maven distribution. Do not open it between your source code; Choose the place ( with no space in the path! )
The simple solution for this would be to re-establish Java or Maven at a different location so that there not one place path
1 - .... unless you have the nuts option for the name of your installation location
2 - Apparently a common "magic" solution for Windows routing problems is a semicolon strange on the end, it is not recommended in general. It does not work at all here.
Comments
Post a Comment