错误1:

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

解决方法:

右键项目“Properties”,在弹出的窗口左侧,单击“MyEclipse"->“Project Facets”,打开“Project Facets”页面.在页面中的“Java”下拉列表中,选择相应版本就OK了。如下图

myeclipse maven工程实践遇到的错误及解决方法集锦_maven



报错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.p_w_picpath.codec.jpeg.JPEGCodec;
import com.sun.p_w_picpath.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