1. 程式人生 > >eclipse(優化八) eclipse maven專案報錯:Access restriction: The type 'Timestamp' is not API

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')

如:

二 解決辦法:

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】刪除重新匯入

如:



原文:https://blog.csdn.net/zengdeqing2012/article/details/47344239