myeclipse maven工程實踐遇到的錯誤及解決方法集錦

錯誤1:

java compiler level does not match the version of the installed java project face

解決方法:

右鍵項目“Properties”,在彈出的窗口左側,單擊“MyEclipse"->“Project Facets”,打開“Project Facets”頁面.在頁面中的“Java”下拉列表中,選擇相應版本就OK了。如下圖

wKiom1TsMyagL5SZAAK7dh0EmlA196.jpg



報錯2,也可能在import前面報警告warnning:

Access restriction: The type JPEGImageEncoder is not accessible due to restriction

解決方法: 
Project -> Properties -> libraries, 

先remove掉JRE System Library,然後再Add Library重新加入。

============================================

在Eclipse中處理圖片,需要引入兩個包:
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
報錯:
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章