解决Eclipse Access restriction: 问题

The method encode(byte[]) from the type CharacterEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_21\jre\lib\rt.jar

 

其实要解决它也很容易,在Window -preferences - Java - Compiler - Errors/Warnings界面的Deprecated and restricted API下。把Forbidden reference (access rules): 的规则由默认的Error改为Warning即可。

你可能感兴趣的:(java,eclipse,C++,c,Access)