Today, on WIN10, you intend to create a Java MAVEN Web project with IntelliJ (Java IDE), so you set up MAVEN's environment variables on this computer, and refer to this setup article:
http://blog.csdn.net/tongyuehong137/article/details/50688092
After the deployment, report the error of the image,
I checked my java-version and javac-version are 1.6.0.45.
The following figure:
C:\users\administrator>java-version
java Version "1.6.0_45"
Java (TM) SE Runtime Environment (build 1.6.0_ 45-B06)
Java HotSpot (TM) Client VM (build 20.45-b01, mixed mode, sharing)
C:\users\administrator>javac- Version
Javac 1.6.0_45
c:\users\administrator>
I am under the Maven, version is: 3.50
I later looked at Maven's website, which requires 1.7 and more JDK versions for version 3.3 and above.
I later changed the JDK to 1.8, as follows
C:\users\administrator>java-version
java Version "1.8.0_121"
Java (TM) SE Runtime Environment (build 1.8.0_ 121-B13)
Java HotSpot (TM) 64-bit Server VM (build 25.121-b13, Mixed mode)
C:\users\administrator>javac- Version
Javac 1.8.0_121
c:\users\administrator>
When you perform mvn-version or mvn-v, you are normal, as follows:
C:\users\administrator>mvn-version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04t03:39:06+08:00)
Maven home:c:\maven\apache-maven-3.5.0\bin\.
Java version:1.8.0_121, vendor:oracle Corporation
java home:c:\program files\java\jdk1.8.0_121\jre
Default LOCALE:ZH_CN, platform ENCODING:GBK
OS name: "Windows Ten", Version: "10.0", Arch: "AMD64", Family: "Windows "
c:\users\administrator>
If you find yourself in a normal configuration, and perform java-version and javac-version times version inconsistencies, see if there are any other JRE in the path that is causing the conflict.