Right click on My Computer >> Properties >> Advanced system settings >>
System Properties window will get displayed
Under Advanced >> Environment Variables
Click on New to set Environment Variables
Variable name: JAVA_HOME
Variable value: C:Program FilesJavajdk1.8.0_121
Variable name: M2
Variable value: %M2_HOME%in
Variable name: M2_HOME
Variable value: C:Program FilesApache Software Foundationapache-maven-3.5.0
Variable name: Path
Variable value: %M2_HOME%in
Then click on Ok, ok, ok.
Now restart you command prompt and check again with “mvn –version” to verify the mvn is running, you may restart your system also.
It's Working...... Enjoy :)
Thanks
Sandeep Nehte
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…