0

A friend asked me to make a minecraft plugin for them, so I need to install Maven. I've installed the following user variables as instructed by the tutorial.

  • JAVA_HOME -- Value: C:\Program Files\Java\jdk1.8.0\bin

  • M2_HOME -- Value: C:\Minecraft Plugin Development\apache-maven-3.2.1

  • M2 -- Value: %M2_HOME%\bin

I've also added ;%M2% to my system PATH variable as instructed. My problem is running the mvn --version command to verify if it's installed. I tried to also set the variables using SET M2, SET M2_HOME, SET JAVA_HOME, and SET PATH. I've attempted that as instructed by an answer on

windows 7 maven 2 install

It responds to me when I try setting it in Command Propmpt by saying Environment variable (Name) not defined. How would I successfully run mvn --version?

Thanks for reading.

.

EDIT in response:

So I went to the bin directory like jayalalk said, I ran it and it recognized the command. However, it said

Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your java installation.

I checked and I have declared JAVA_HOME in both User and System variables to the correct location of my java installation, C:\Program Files\Java\jdk1.8.0\bin.

Also, this is my system PATH variable value: C:\Program Files\Java\jdk1.8.0\bin;%M2% Is there anything wrong with that?

1
  • 1
    Just try to go to maven folder and its bin folder from command line, and try mvn --version and verify first. If works then you have some problem with path setting, then type SET PATH in command line and verify your path is added in PATH variable Commented May 14, 2014 at 0:38

1 Answer 1

1

It seems set JAVA_HOME = "C:\Program Files\Java\jdk1.8.0" and path = %JAVA_HOME%\bin;%M2%.

Sign up to request clarification or add additional context in comments.

1 Comment

Umm.. I kinda just realized I might have deleted my entire path variable awhile back.. My whole path variable is currently %JAVA_HOME%\bin;%M2%.. Should I default it to the original then add this on? And if so, what is the original?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.