Eclipse下BASE64Decoder提示错误的解决办法
2016-02-18 15:49
393 查看
在MyEclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:
Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program
files\java\jre6\lib\rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
解决方案1(推荐):
只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。
解决方案2:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning
Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program
files\java\jre6\lib\rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
解决方案1(推荐):
只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。
解决方案2:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning
相关文章推荐
- Java带进度多线程下载文件
- Java学习笔记
- JMS【四】--Spring和ActiveMQ整合的完整实例
- java 控制台 输入字符串
- 第六章 软键盘事件
- JDK各版本新特性
- 笔记-Java线程概述
- JSP处理JavaBean
- java实现以类为对象把各属性值放入map
- hdu 2031 java
- 启动eclipse报错:Failed to load the JNI shared library
- 自己动手写个spring IOC容器
- 为什么Java接口里使用public static final修饰成员变量
- java虚拟机——深入java虚拟机(二)——类加载器详解(上)
- 阿里校园招聘对java本科生的要求
- 第一章 Eclipse打开出现问题
- Java synchronized(2)
- 枚举类型的单例模式(java)
- Java 内存泄露的例子
- Spring 声明式事务,propagation属性列表