转自: https://www.mkyong.com/java/access-restriction-the-type-base64encoder-is-not-accessible-due-to-restriction/

If you insist want to use sun.misc.BASE64Encoder, in Eclipse, right click on the project, properties -> Java compiler –> Errors/Warnings –> Deprecated and restricted API –> Forbidden reference (access rules), change the default “Error” to “Warning“. Now, your code should be able to compile, but with some warning messages. 

The above solution is not recommended, you should replace sun.misc.BASE64Encoder with other BASE64 class like Apache common codec. that is http://commons.apache.org/proper/commons-codec/

import org.apache.commons.codec.binary.Base64;//...result = new Base64().encodeToString(rawHmac);

Access restriction: The type 'BASE64Encoder' is not API 的解决方法相关推荐

  1. java常见错误--Access restriction: The type BASE64Encoder

    Access restriction: The type BASE64Encoder is not accessible due to restrict 在Eclipse中编写Java代码时,用到了B ...

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

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

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

    在eclipse中使用sun.misc.BASE64Encoder,却提示"Access restriction: The type BASE64Encoder is not accessi ...

  4. SVN检出项目报:Access restriction: The type 'BASE64Decoder' is not API

    1.起因 今天从SVN里检出项目出现个别文件报错(Access restriction: The type 'BASE64Decoder' is not API (restriction on req ...

  5. clipse中Access restriction: The type ‘XXX’ is not API 解决

    报此错误只需将jre由jdk路径下的jre改为外部的jre即可,具体做法为: Project -> Properties -> Java Build Path -> Librarie ...

  6. 【JavaWeb】Access restriction The type is not accessible due to restriction on required library

    MyEclipse无法访问到jar包的解决方法 MyEclipse中编写Java代码时,用到了BASE64Decoder import sun.misc.BASE64Decoder: 和图片处理相关的 ...

  7. Access restriction: The type Unsafe is not accessible due to restriction on required library

    无事下载Google的common包guarva玩玩,丢到eclipse中就编译报错:Access restriction: The type Unsafe is not accessible due ...

  8. No qualifying bean of type xxx‘ available 的一种解决方法

    No qualifying bean of type xxx' available 的一种解决方法 参考文章: (1)No qualifying bean of type xxx' available ...

  9. MySQL------报错Access denied for user ‘root‘@‘localhost‘ (using password:NO)解决方法

    MySQL------报错Access denied for user 'root'@'localhost' (using password:NO)解决方法 参考文章: (1)MySQL------报 ...

最新文章

  1. 【Qt】QtCreator中的单例编程(以ActionManager为例)
  2. umask遮罩码(反向掩码)简单说明
  3. 修改开发环境、工程、文件的字符集
  4. android绘制环形进度_Android动态自定义圆形进度条
  5. ASP 代码当前记录集不支持更新问题的解决办法。
  6. windows打开设备管理器
  7. au人声处理_Audacity音频处理
  8. sat数学逻辑推理题解题方法
  9. python 公众号引流_公众号粉丝从0到1000的引流思路
  10. git init报错Reinitialized existing Git repository
  11. 上海计算机一级和四六级,大学英语六级比四级难多少?985学长含泪告诉你!
  12. linux下的web服务器压力测试工具之ab
  13. 在Win32下使用OpenGL
  14. 华为云HCS解决方案笔记HUAWEI CLOUD Stack【面试篇】
  15. 照度稳定可调LED台灯
  16. 机械结构day_13
  17. 程序员们,国庆长假快乐呀!
  18. 【java】tomcat配置域名访问并修改端口号
  19. Python3-豆瓣电影影片差评和影片封面照片的爬取
  20. 用DIV+CSS技术设计的鲜花网站(web前端网页制作课作业)

热门文章

  1. Codeforces Round #700 (Div. 1) C. Continuous City 构造 + 二进制
  2. Jumping Monkey(CCPC网络赛重赛)
  3. P4294-[WC2008]游览计划【斯坦纳树】
  4. P3804-[模板]后缀自动机【SAM】
  5. nssl1447-小智的糖果【dp】
  6. P2672-推销员【贪心】
  7. 学习手记(2018/7/14~2018/7/18)——快乐纪中
  8. P2598-狼和羊的故事【最大流,最小割】
  9. P3957-跳房子【单调队列,dp,二分】
  10. ssl2346-联络员【图论,最小生成树】