1. 程式人生 > >eclipse錯誤:Access restriction: The type 'BASE64Decoder' is not API

eclipse錯誤:Access restriction: The type 'BASE64Decoder' is not API

Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jdk1.7.0_45\jre\lib\rt.jar’)

解決其實很簡單,把JRE System Library移除重新新增即可。
方法:專案右鍵–>Properties–>Java Build Path,切換到libraries tab頁,找到JRE System Library移除, 然後再點選Add Library–>JRE System Library新增即可。

 

 

如果import後仍然是報錯!

 

 

圖文來源:

https://blog.csdn.net/gnail_oug/article/details/53636428

https://blog.csdn.net/lvyanfen6/article/details/51121586