PATHwas set in the environment variables as the user environment variable, and
JAVA_HOMEwas set in the system environment variables.
- Also, the error of
NB: JAVA_HOME should point to a JDK not a JREwas not generated because the path destination is JRE, but it was generally displayed when the JDK could not be recognized.
JAVA_HOMEby user environment variable.
- Winodws 10
- Maven 3.6.3
- I usually do Android development on Mac, but I happened to touch Spring Boot on Windows and installed Java, Marven on Windows.
- I have set
M2_HOMEin the environment variable and also set Path.
- Maven can’t run because
mvn -vgives the following error
``` 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
JAVA_HOMEwas already set on the PC and
Pathwas also set, but…
I am indebted to the following articles for the solution