By go - Last updated: 星期四, 四月 27, 2017


The method encode(byte[]) from the type CharacterEncoder is not accessible due to restriction on required library C:Program FilesJavajdk1.6.0_21jrelibrt.jar

Access restriction: The method ‘AWTUtilities.setWindowShape(Window, Shape)’ is not API (restriction on required library

Access restriction: The type ‘AWTUtilities’ is not API (restriction on required library ‘C:Program FilesJavajre1.8.0_121librt.jar’)

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