eclipse(优化八) eclipse maven项目报错:Access restriction: The type 'Timestamp' is not API

报错描述:

Access restriction: The type 'Timestamp' is not API (restriction on required library 'C:\Program Files\Java\jdk1.7.0_25\jre\lib\rt.jar')

如:

eclipse(优化八) eclipse maven项目报错:Access restriction: The type 'Timestamp' is not API_第1张图片


二 解决办法:

2.1 原因分析: 

2.2 方法一:
全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】

2.3 方法二(终极方法:)
 项目属性preferences>java build path>把右侧【libraries中的JRE System Library】删除重新导入

如:

eclipse(优化八) eclipse maven项目报错:Access restriction: The type 'Timestamp' is not API_第2张图片

你可能感兴趣的:(开发工具-eclipse)