Access restriction: The type BASE64Decoder is not accessible due to restriction on required library D:\java\jre1.5.0_08\lib\rt.jar
在网上找到了解决方法如下,我是用第二种方法解决的~~
Solution 1 :
import=”sun.misc.BASE64Decoder”
出现错误提示为:Access restriction: The type BASE64Decoder is not accessible due to restriction
on required library D:\ProgramFiles\MyEclipse\jre\lib\rt.jar
Solution 1 :
BASE64Decoder
这个没有java doc,属于jdk里不推荐使用的工具类
解决方案:
使用apache common中的Base64替换
你可以在这里下载Apache commons codec:
http://commons.apache.org/codec/
替换一下就可以了
强烈建议不要用sun.misc,是不安全的 ,最好不要使用
Solution 2:
1. Open project properties.
2. Select Java Build Path node.
3. Select Libraries tab.
4. Remove JRE System Library.
5. Add Library JRE System Library.
转自:http://hi.baidu.com/luoziding/item/5032bdeb539556f0e1a5d46d
在网上找到了解决方法如下,我是用第二种方法解决的~~
Solution 1 :
import=”sun.misc.BASE64Decoder”
出现错误提示为:Access restriction: The type BASE64Decoder is not accessible due to restriction
on required library D:\ProgramFiles\MyEclipse\jre\lib\rt.jar
Solution 1 :
BASE64Decoder
这个没有java doc,属于jdk里不推荐使用的工具类
解决方案:
使用apache common中的Base64替换
你可以在这里下载Apache commons codec:
http://commons.apache.org/codec/
替换一下就可以了
强烈建议不要用sun.misc,是不安全的 ,最好不要使用
Solution 2:
1. Open project properties.
2. Select Java Build Path node.
3. Select Libraries tab.
4. Remove JRE System Library.
5. Add Library JRE System Library.
转自:http://hi.baidu.com/luoziding/item/5032bdeb539556f0e1a5d46d
本文详细介绍了在JAVA开发中遇到BASE64Decoder无法访问时的解决方法,包括使用Apache Commons中的Base64类作为替代方案,并强调了避免使用sun.misc的原因。文章还提供了详细的步骤和代码示例,帮助开发者顺利解决问题。
2199

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



