项目中用到sun.misc.BASE64Decoder,本人用的Eclipse4.2,我重新导入项目时,Eclipse报错Access restriction: The type BASE64Encoder is not accessible due to restriction on required D:\jdk1.6.0_18\lib\rt.jar ,很闷郁。在度娘上查看了一些网友的解决方案:
方案一解决方法如下:
1、进入Project --> Properties --> Java Build Path --> Libraries
1、进入Project --> Properties --> Java Build Path --> Libraries
2、remove 掉 JRE System Library
3、Add Library 重新加入JRE System Library
添加后即可解决此问题。本人试过,是可行的。
方案二解决方法如下:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and trstricted API -> Forbidden reference (access rules): ->
change to warning
这种方法,设置好像会弹出警告窗口。
建议用第一种方案处理就可以了。
本文详细介绍了如何解决在Eclipse 4.2中使用sun.misc.BASE64Decoder时出现的权限限制错误。通过两种方法:一是删除并重新添加JRE系统库;二是修改错误提示为警告。提供了具体操作步骤,帮助开发者顺利解决问题。
6799

被折叠的 条评论
为什么被折叠?



