WIN10 the MAVEN environment after the implementation of Mvn-version in CMD, error: Exception in thread "main" Java.lang.UnsupportedClassVersionE

Source: Internet
Author: User
Tags mixed

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.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.