mvn not recognized as an internal or external command error

0 votes
I am trying to install maven on windows. I have downloaded the apache mavenbin.zip and extracted it on my C:\Program Files\apache-maven-3.6.1. I already have jdk 1.8 installed in my system and also have configured the JAVA_HOME and MAVEN_HOME environment variables via the system properties.I have also ensured that i have added their respective bin locations on the PATH variable. Still i am encountering the above error. Kindly help!
Jun 3 in DevOps Tools by Namik
• 180 points
47 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Setting the environment variables JAVA_HOME, MAVEN_HOME and  PATH  via the system property settings may not be effective sometimes.In the command prompt, echo %JAVA_HOME% ,%MAVEN_HOME%, %PATH% and check the values if they are correctly set and included in the PATH as well. if not, you need to set those Environment variables via the command prompt using the following command:

setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_211"

setx PATH "%PATH%;%JAVA_HOME%\bin";

same for MAVEN_HOME as well.

setx MAVEN_HOME "C:\Program Files\apache-maven-3.6.1"

setx PATH "%PATH%;%MAVEN_HOME%\bin";

You can check if these are set appropriately by running the commands:  java -version and mvn --version on the command prompt.

answered Jun 3 by Sirajul
• 940 points

Related Questions In DevOps Tools

0 votes
1 answer

Getting an Error while trying to push changes to cloud foundry

Here is an approach which you can ...READ MORE

answered Jul 19, 2018 in DevOps Tools by Atul
• 10,220 points
74 views
+4 votes
2 answers

Jenkins not showing Maven Release Plugin

Make your project type Maven Project. This ...READ MORE

answered Oct 11, 2018 in DevOps Tools by Hannah
• 14,080 points
524 views
0 votes
1 answer
0 votes
1 answer

running comands as non-root user while using docker-maven plugin

Docker needs root access therefore maven commands ...READ MORE

answered Apr 30, 2018 in DevOps Tools by ajs3033
• 7,080 points
404 views
0 votes
3 answers
+13 votes
2 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.