F:\MyLearningFiles\demo1\ssm>mvn clean package -DskipTests
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
Solution
Solution: In maven\apache-maven-3.5.4\bin, here is your maven installation address directory, there is a mvn.cmd in it . Open and add set JAVA_HOME=D:\Program Files\Java\jdk1.8.0_91 on the first line, here is your jdk installation directory. Just re-execute.