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

原创 2012年03月28日 19:49:23

    今天在写一个WebService程序时,用到了sun.misc.BASE64Encoder().encode(baos.toByteArray()); 但遇到了一个错误:

Access restriction: The type BASE64Encoder is not accessible due to restrict on required library  java/lib/rt.jar。

导入了这个jar可是还是不行,于是查了一下,解决方法是在project的build path里先删除JRE System Library,然后再添加一遍,就好了。

我也不知道为什么这么做,求大神解释~~

sun.misc.BASE64Encoder找不到jar包的解决方法

1.右键项目-》属性-》java bulid path-》jre System Library-》access rules-》resolution选择accessible,下面填上** 点击确定即可!...
  • JBxiaozi
  • JBxiaozi
  • 2012年03月14日 10:05
  • 214497

Access restriction: The type BASE64Decoder is not accessible due to restriction on required library

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

The type Base64 is not accessible due to restriction on required library 解决办法

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

Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案

Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案...
  • defonds
  • defonds
  • 2011年04月11日 10:07
  • 68259

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

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

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

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

错误总结:Access restriction: The type ** is not accessible due to restriction on required library

来到新公司,下载代码查看后发现有很多地方标红报错了.     仔细一看都是Access restriction: The type ** is not accessible due to restr...
  • lk_blog
  • lk_blog
  • 2015年04月29日 21:23
  • 2677

eclipse报Access restriction: The type 'BASE64Decoder' is not API处理方法

今天从svn更新代码之后,由于代码中使用了BASE64Encoder 更新之后报如下错误: Access restriction: The type ‘BASE64Decoder’ is no...

Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'D:\Java\jd

Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'D:\Java\jd...

**Access restriction: The type 'WebServlet' is not API (……)**

错误: **Access restriction: The type ‘WebServlet’ is not API (restriction on required library ‘D:\Prog...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Access restriction: The type BASE64Encoder is not accessible due to restrict on required library
举报原因:
原因补充:

(最多只允许输入30个字)