Access restriction错误

来源:互联网 发布:1080p网络摄像头 编辑:程序博客网 时间:2024/04/30 03:15
  • 今日调用sun.misc.BASE64Decoder()与sun.misc.BASE64Encoder()方法时,eclipse报 Access restriction: The method encode(byte[]) from the type CharacterEncoder is not accessible due to restriction on required library ….(jre的 rt.jar 地址)

    • 这个问题就百度了一下,原来是eclipse设置问题,只要在
    • windows–>preferences–>Java–>Compiler–>Errors/Warnings中,找到Deprecated and restricted API,将当中的Forbidden references(access rules) 设为Warning即可
0 0
原创粉丝点击