Description Resource Path Location Type Java compiler level does isn't match the version of the In Solution __JDK

Source: Internet
Author: User

This is the wrong time to use maven today.

And then checked on the Internet, the JDK version does not match,
There are several places you can modify

Workaround 1:

The JDK I use is 1.8

Windows-proferences-java–compiler set JDK to 1.8

Windows-proferences-java–installed JREs set JDK to 1.8

Click Item Right button –properties-java Compiler set JDK to 1.8

Click the Item right button –properties-eclipse-project Facets set Java to 1.8

Click the item right key –properties-eclipse-project facets set dynamic Web Module to 3.1 (this is your servlet version of Web.xml configuration)

Click the Item right button –maven-update Project error should be eliminated

If it's still not working, you're in Pom.xml.

<plugins>
     <plugin>  
            <groupId>org.apache.maven.plugins</groupId>  
            < artifactid>maven-compiler-plugin</artifactid>  
            <version>2.0.2</version>  
            < configuration>  
                <source>1.8</source>  
                <target>1.8</target>  
            </ configuration>  
        </plugin>  
    </plugins>

So we can solve the mistake.

Workaround 2: Modify the installation directory. modifying JDK versions in Settings.xml in \apache-maven-3.3.9\conf
Adding in the Profiles node

<profile>  
    <id>jdk-1.8</id>  
     <activation>  
          <activebydefault>true</ activebydefault>  
          <jdk>1.8</jdk>  
      </activation>  
<properties>  
< Maven.compiler.source>1.8</maven.compiler.source>  
<maven.compiler.target>1.8</ Maven.compiler.target>  
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>  
</properties>  
</profile>   

If it's still not working, go to the place where the project is stored. I'm F:\eclipse\workspace\seckill.settings modify org.eclipse.wst.common.project.facet.core.xml this file

<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
  <fixed facet= "Wst.jsdt.web"/ >
  <installed facet= "Jst.web" version= "3.1"/> <installed facet=
  "Wst.jsdt.web" version= "1.0"/ >
  <installed facet= "java" version= "1.8"/>
</faceted-project>

Modify installed facet= "Jst.web" version= "3.1"/3.1
Installed facet= "Java" version= "1.8"/> to 1.8

That's OK.

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.