Search code examples
windowsmavenpath

How to add Maven to the Path variable?


I have downloaded the maven 3.5.0 from here. I have set it in the path:

C:\apache-maven-3.5.0

Then i treid to add it to the path of Windows 7 as below:

  1. Right click on my computer

  2. Properties

  3. Advanced System Setting

  4. Environment Variable

  5. New user variable and added Maven_Home with value C:\apache-maven-3.5.0

  6. Add it to path variable with: %Maven_Home%\bin

  7. Open cmd and ask for mvn -version in desktop

Result:

It does not recognize maven


Solution

  • The problem get solved when i edit the path variable with ;%Maven_Home%\bin; so i should add the ; before and after it.