I am taking a spring boot course and am up to a stage where the program is being run from the command window. I thought I had downloaded maven correctly but if I type mvn package
I get:
'mvm' is not recognized as an internal or external command, operable program or batch file.
mvnw package
:
JAVA_HOME = "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe" Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
mvnw -version
gives the same message as above and mvn -version
gives:
The JAVA_HOME environment variable is not defined correctly, this environment variable is needed to run this program.
I have set the JAVA_HOME
and MAVEN_HOME
path as shown in the screenshot but it is still not working.
https://i.stack.imgur.com/TFvWn.png https://i.stack.imgur.com/Gk3RF.png
When I type echo %JAVA_HOME%
into cmd I get:
C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe
and when I change the JAVA_HOME
path to that I get the same result.
I have added the path extensions as shown in the image below https://i.stack.imgur.com/AZfUj.png
If anyone can help that would be very much appreciated!