Dynamic Web Module 3.0 requires Java 1.6 or newer

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dynamic Web Module 3.0 requires Java 1.6 or newer相关的知识,希望对你有一定的参考价值。

问题描述

技术分享

问题解决

首先检查编辑器是否已经设置为1.7:

Right click your project > Properties > Java Compiler and set “Compiler compliance level” to 1.7

然后,检查Project Facts:

Next from the menu on the left select Project Facets > Java and set its version to 1.7;

如果还没有添加jdk1.7,则需要先添加:

Navigate to eclipse Preferences > Java > Installed JREs, click Add, and locate your installed Java path.

对maven项目,在pom.xml中添加如下配置:

<build>
    <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
            <source>1.7</source>
            <target>1.7</target>
        </configuration>
    </plugin>
    </plugins>
</build>

最后,更新工程:

right click on your project > Maven > Update Project…

 

要点摘自:http://qussay.com/2013/09/13/solving-dynamic-web-module-3-0-requires-java-1-6-or-newer-in-maven-projects/

以上是关于Dynamic Web Module 3.0 requires Java 1.6 or newer的主要内容,如果未能解决你的问题,请参考以下文章

DescriptionResourcePathLocationType Dynamic Web Module 3.0 requires Java

解决Cannot change version of project facet Dynamic web module to 3.0

eclipse报错Dynamic Web Module 3.0 requires Java 1.6

Eclipse--Maven--Dynamic Web Module 3.0 requires Java 1.6 错误

Dynamic Web Module 2.3 change to 3.0 maven工程解决办法

Cannot change version of project facet Dynamic web module to 3.0