Whenever I type mvn -version
to check version installed it says that "mvn is not an internal or external command"
in cmd.
I have added images to show that I have added environmental variable and the path. do check those and help out.
UPDATE :
After having been told that i have to remove \bin from environment variable of both JAVA_HOME and MAVEN_HOME. now I'm getting error in cmd as JAVA_HOME is not defined.
Environmental variable image
Path Image
Cmd Image
Your
MVN_HOME
should be the maven root folder (G:\compressed\apache-maven-3.8.4
) not up to thebin
folder.Change
MVN_HOME
variable toG:\compressed\apache-maven-3.8.4
then open a new cmd prompt then the command will work.