日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > java >内容正文

java

解决Dynamic Web Module 3.0 Requires Java 1.6 or newer

發(fā)布時間:2025/5/22 java 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决Dynamic Web Module 3.0 Requires Java 1.6 or newer 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?????? ---本文為網(wǎng)絡(luò)查找之后的個人總結(jié),并非全部原創(chuàng),希望能對大家有所幫助。

?????? ecliipse 默認(rèn)的 JDK 版本為1.5,web版本為2.3,當(dāng)我們需要web版本為3.0時,要在相應(yīng)的配置文件中對web和JDK版本做對應(yīng)的修改。我用的是 jdk 1.7

一,修改配置文件

???? 直接打開項目的根目錄找到.settings文件夾需要我們動手腳的文件是:

???? 1.org.eclipse.jdt.core.prefs

??????????? 1.5的全部改為1.7如下:

eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.5


???? 2.org.eclipse.wst.common.component

????????? 將下面的version=”1.5.0”改為version=”1.7.0”

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"><wb-module deploy-name="webtest"><wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/><wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/><property name="context-root" value="webtest"/><property name="java-output-path" value="/webtest/build/classes"/></wb-module> </project-modules>


???? 3.org.eclipse.wst.common.project.facet.core.xml

???????? 將installed facet=”jst.web” version=”2.3”改為installed facet=”jst.web” version=”3.0”, installed facet=”java” version=”1.5”和? installed facet=”wst.jsdt.web” version=”1.5”中的1.5改成1.7

<?xml version="1.0" encoding="UTF-8"?> <faceted-project><fixed facet="wst.jsdt.web"/><fixed facet="java"/><fixed facet="jst.web"/><installed facet="java" version="1.5"/><installed facet="jst.web" version="2.3"/><installed facet="wst.jsdt.web" version="1.5"/> </faceted-project>


二,在eclipse中進(jìn)行修改

??? 1,項目右擊---properties

????????? 要修改的地方如下顯示:

?

????????????? --Java Build Path

 

??? 雙擊后,彈出編輯頁面,選擇SE-1.7---FINISH---apply

?????? -----Java Compiler

??????????????? 去勾選擇,選中應(yīng)用

?????? -----Project Facets

點擊OK即可

?

2,windows---preferences---installed JREs

?

三,修改pom.xml配置文件

在<build></build>中插入如下配置

<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>2.3.2</version><configuration><source>1.6</source><target>1.6</target></configuration></plugin></plugins>

???? 然后保存,項目構(gòu)建完成后在項目文件夾上點右鍵,選擇Maven->Update?Project?Configuration,問題解決。或者項目右擊--debug as--maven clean 然后maven--update project-勾選force update?of snapshots/releases? 問題解決。
????

?

轉(zhuǎn)載于:https://www.cnblogs.com/kunsunshine/p/6293582.html

總結(jié)

以上是生活随笔為你收集整理的解决Dynamic Web Module 3.0 Requires Java 1.6 or newer的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。