Access restriction : The type BASE64Decoder is not accessible due to restriction

  在学习java加密与解密的艺术一书时,系统报错如下,附上解决方案供大家参考。

import sun.misc.BASE64Decoder;
OR
import sun.misc.BASE64Encoder;

The same problem over and over again:
Access restriction : The type BASE64Decoder is not accessible due to restriction on required library D:\Java\jdk1.6.0_11\jre\lib\rt.jar
解决方法:
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.

你可能感兴趣的:(java,Access,sun)