Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Problem while setting Maven Path in vista

Posted on 2010-01-12
Medium Priority
Last Modified: 2013-11-23
Could someone please help me solving the issue of setting enviroment variable in vista? I have my maven intalled C:\Maven\apachemaven\bin, when I run maven --version or mvn --version i get the message 'maven' is not recognized as an internal or external command,
operable program or batch file.

echo %PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%M2%;%JAVA_HOME\bin%
echo %M2%  C:\Maven\apachemaven\bin
echo %M2_HOME% C:\Maven\apachemaven

C:\>maven -version
'maven' is not recognized as an internal or external command,
operable program or batch file.
Question by:AjooAli
  • 2
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 26296556
Your variables are set wrong:

echo %PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%M2%;%JAVA_HOME\bin%

The fact that %M"% is printed in the above means that it hasn't been expanded - you've probably entered it wrong when you set PATH



should be

LVL 86

Assisted Solution

CEHJ earned 2000 total points
ID: 26296565
>>The fact that %M"% is printed in the above means

sorry - that should have said

The fact that %M2% is printed in the above means

Author Comment

ID: 26296650
Thanks C:\Maven\apachemaven\bin worked

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question