I'm trying to set up a project in my new laptop. While doing so, I faced this error even though the JAVA_HOME variable is set correctly.
Error:
C:\WINDOWS\system32>mvn -version
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Environmental Variables in laptop:
Solutions tried so far:
Any possible solution is appreciated.
As Mark Rotteveel mentioned, removing the semi colon at the end fixed the error. I'm able to run maven commands now.