How to install maven on windows 7

Maven is a build and dependency management tool for java based application development. Just like other java based development tools, it is not installed as windows service, rather it is configured using windows environment variables. These variables can be accessed from below location:

Control Panel > All Control Panel Items > System > Advanced system settings > Environment Variables

In this post, I will summarize the steps needed to install maven on windows 7 operating system.

Step 1) Install Java if not already done

To install java, download JDK installer and add/update the JAVA_HOME variable.


Step 2) Download Maven and extract it to desired location

Maven can be downloaded from this location. I have extracted it in location : D:Latest Setupapache-maven-3.0.4. You can choose your own.

Now, set the MAVEN_HOME variable just as you did for JAVA_HOME variable.


Step 3) Update PATH variable

To run maven from command prompt, this is necessary. Update the PATH variable with Maven’s installation bin directory.


Step 4) Test the installation

Maven installation is complete. Now lets test it from windows command prompt. Go to start menu and type cmd in application location search box. Press ENTER. A new command prompt will be opened. Type mvn -version in command prompt and hit ENTER.


This should show the version information of maven installed. If there is any error shown, cross-check all above steps.

Happy Learning !!


I have 7 Years of rich experience in java technology. This has only increased my hunger to learn more. In this blog, i will be writing on different topics occasionally, and would love to engage in some meaningful serious discussions with you folks.

You may also like...

14 Responses

  1. Asha says:

    I am not seeing Maven Dependency in Eclipse….any suggestion?

  2. bheem says:

    could not find or load main class org.codehaus.plexus.classworlds. launcher error my system

    I am using Windows 8

    Jdk 8

  3. Raunak says:

    Thank you

  4. Tanya says:

    Excellent Thank you

  5. kaarthik says:

    thank you… it just took me 5 to 10 minutes to complete it…

  6. Neha Insa says:

    i enterd maven_home,java_home and path,,bt still not excecute on cmd

  7. Satheesh says:

    HI , Firstly thanks for your blog n tutorials. Nicely explained How to configure Maven in window environment.

  8. veerachandra says:

    Hi Lokesh.. U did a grt job for the newbies..
    Thanx a lot :)

  9. manoj says:

    thanx bro its working

  10. Ummer says:

    Hi Lokesh,
    Its very good article, if you post how to install maven on other OS then its sounds better.


Note:- In comment box, please put your code inside [java] ... [/java] OR [xml] ... [/xml] tags otherwise it may not appear/post as intended.

Want to ask any question? Or suggest anything?