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
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?