Statement
- MVN not recognized as an internal or external command.
Environment :
- JRE 1.8
- Maven 3.5.3
- Windows 8.1
Solution :
Step1 :
v Install the
JRE/SDK 1.8
v Create the system
Variable : (Right click on My
Computer à Properties à Advanced system settings àSystem
Properties window will get displayed àUnder Advanced à Environment VariablesàSystem VariableàNewàEnter the
Variable name and Variable value)
o
Variable name = JAVA_HOME
o
Value = C:\Program Files\Java\jdk1.8.0_65(path
depends on the drive in which java installed)
v add the JAVA_HOME
variable path in the system PATH variable
§ PATH =
%JAVA_HOMOE%\bin
v Go to the
command prompt and validate the JDK version c:\java – version it must
show the JDK version.
v That’s it! ,Java
installation is done successfully.
Step2:
v Install the
Maven software
v Create the system
Variable : (Right click on My
Computer à Properties à Advanced system settings àSystem
Properties window will get displayed àUnder Advanced à Environment VariablesàSystem VariableàNewàEnter the
Variable name and Variable value)
o
Variable name = MAVEN_HOME
o
Variable Value = D:\Maven_3_5_3\apache-maven-3.5.3-bin\apache-maven-3.5.3
(path depends on the drive in which maven installed)
v add the MAVEN_HOME
variable path in the system PATH variable
§ PATH = %MAVEN_HOMOE%\bin
v Go to the
command prompt and validate the Maven version c:\mvn – version it must
show the MVN version.
v That’s it!, Maven installation is done successfully.
Observation – M2_HOME
variable doesn’t work for the JRE 1.8 for windows 8.1, MAVEN_HOME variable only
works!.