Dynamic Web Module 3.1 requires Java 1.7 or newer. 錯誤解決方案

來源:互聯網
上載者:User

標籤:strong   軟體   2.3   fine   選擇   1.7   size   div   9.png   

在寫代碼的時候工程出現了這樣奇怪的bug很是蛋疼啊,經過查詢解決方案,終於解決了這些個問題。

下面是解決問題的方法,和大家分享一下

(1)確定你的java工程配置使用了java 7

按右鍵你的工程project > Properties > Java Compiler and set “Compiler compliance level” to 1.7

 

(2)選擇Java Build Path. 按照點擊 “Edit“. 把JDK版本調到“Java 7″

 

(3)選擇Project Facets > Java 將它的版本也設定為 1.7

 

(4)在確認完上面的步驟之後,再在你的pom.xml檔案中添加下面的代碼

<build>      <plugins>          <!-- define the project compile level -->          <plugin>              <groupId>org.apache.maven.plugins</groupId>              <artifactId>maven-compiler-plugin</artifactId>              <version>2.3.2</version>              <configuration>                  <source>1.7</source>                  <target>1.7</target>              </configuration>          </plugin>      </plugins>  </build>  

 

(5)之後就執行 Maven -> Update Project. 就可以了,你會驚奇的發現問題被解決了。

 

註:有問題不可怕,怕的是怯懦的心,怕的是失去戰鬥的勇氣。出現一個問題解決一個,愚公尚能移山,我也一定能成為軟體工程的頂尖人才。

 

Dynamic Web Module 3.1 requires Java 1.7 or newer.錯誤解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.