Access restriction错误

  • 今日调用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即可

你可能感兴趣的:(eclipse)