解决import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder;报错的问题
在项目中用到这两个Jar包,但是程序报错。
Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program
files\java\jre7\lib\rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre7\lib\rt.jar
解决方法:
右键项目 -> Build Path -> Configure Build Path -> Libraries -> 选中 JRE System Library -> Remove
接着: Add Library -> JRE System Library 重新编译后,就没有问题了。