Access restriction: The type BASE64Encoder is not accessible due to restrict

2011年11月18日 20:47:06 阅读数:8142 标签: accesslibraryeclipseconstructorjavacompiler更多

个人分类: J2SE
 
在Eclipse中编写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 
搞不懂是为什么,最后在http://forums.dzone.com/eclipse/384-access-restriction- problems.html找到答案,只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。但是我仍然很疑惑是为什么。。。 
原文见:http://zhoushuyan.cn/java/the-type-base64decoder-is-not-accessible-due-to-restriction-on-required-library/ 
------------------------------ 
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> 
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning

转自:

http://palwang.iteye.com/blog/906425

Access restriction: The type BASE64Encoder is not accessible due to restrict(转载)的更多相关文章

  1. java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict

    在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...

  2. "Access restriction: The type BASE64Encoder is not accessible due to restrict"问题解决

    问题如题: Eclipse中有一种叫做存取限制的机制,来防止你错误使用那些非共享的API.通常来说,Eclipse做的是对的,因为两点,我们不想要使用非共享API的,而且Eclipse知道什么是共享的 ...

  3. Access restriction: The type TaskTopicResolver is not accessible due to restrict

    Access restriction: The type TaskTopicResolver is not accessible due to restrict :  Eclipse 默认把这些受访问 ...

  4. Access restriction: The type BASE64Encoder is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方案:在configure build path 中去掉 jre system library,然后重新加载jre system library.....

  5. MyEclipse报错Access restriction: The type BASE64Encoder is not accessible due to restriction on required library

    错误截图: 解决办法: 1.进入Project --> Properties --> Java Build Path --> Libraries 2.remove 掉 JRE Sys ...

  6. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...

  7. 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library

    在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...

  8. 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  9. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

随机推荐

  1. day 94 RestFramework序列化组件与视图view

    一 .复习 1. CBV流程 class BookView(View): def get(): pass def post(): pass #url(r'^books/', views.BookVie ...

  2. python http post json

    直接上代码吧 #coding=utf-8 import os import urllib import urllib2 import re import cookielib import json h ...

  3. ELASTICSEARCH健康red的解决

    今天惯例看统计报表, 才发现es集群悲剧了......昨天下午到今天早上, 持续报错, 写了1G的错误日志>_<#(暂无监控....) 当前状态: 单台机器, 单节点(空集群), 200W ...

  4. cas单点登陆系统-casServer搭建

    最近工作比较忙,空闲的时间在搞单点登陆系统,自己写了一套SSO在GitHub上,过程走通了.通过这个例子,自己熟悉了流程,而且破天荒的使用了抽象设计模式,并且熟悉了cookies和session的使用 ...

  5. JSTL介绍及使用

    JSTL介绍及使用 一.JSTL(JSP Standard Tag Library)简介 > JSTL是JSP的标准标签库 > JSTL为我们提供了一些常用的标签,供我们日常开发使用(if ...

  6. Oracle性能问题sql调优脚本集

    ---------------------------------------------------------------------------------------------------- ...

  7. Java虚拟机执行引擎

    执行引擎 关于执行引擎相关的部分, 在之前的博文里 Java内存区域中已经有所提及. 回顾一下: 也只有几个概念, JVM方法调用和执行的基础数据结构是 栈帧, 是内存区域中 虚拟机栈中的栈元素, 每 ...

  8. 手把手教你如何安装和使用Karma-Jasmine

    注意:本文中出现的资料链接.karma的插件安装等,均可能需要翻$墙后才能正确执行. Jasmine是一个Javascript的测试工具,在Karma上运行Jasmine可完成Javascript的自 ...

  9. Install MySql on CentOS

    Installing & Configuring MySQL Server This Howto will show you how to install MySQL 5.x, start t ...

  10. (转)Python 字符串

    原文:http://www.runoob.com/python/python-strings.html