解决:Java compiler level does not match the version of the installed Java project facet.

不说废话,直入主题;

1.首先

项目-->properties-->java compiler

2.其次

-->project facets

3.再后

window-->preferences-->java-->compiler

4.项目--> alt+F5 重新编译一下;

5.以上更新后还会报异常;

修改maven的配置文件setting.xml,找到<profiles>,然后在之间添加以下内容:

    <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>

猜你喜欢

转载自blog.csdn.net/u014259503/article/details/81536387
今日推荐