Access restriction 问题解决
Posted 晓怂样
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Access restriction 问题解决相关的知识,希望对你有一定的参考价值。
最近导入新项目,导入所有用到的jar包,发现其中一个引用报错
import com.sun.istack.internal.Nullable;
具体信息如下:
Access restriction: The type Nullable is not accessible due to restriction on required library C:\Program Files\Java\jdk1.7.0_09\jre\lib\rt.jar
确定对应jar包存在
解决方法:
1、选中报错项目,右键,选择properties
2、选择java build path, Libraries中的JRE System Libarary[...]下的Access rules,点击Edit
3、选择Add,Resolution选择Accessible,Rule pattern输入**,OK 保存
稍等会,就搞定了!
以上是关于Access restriction 问题解决的主要内容,如果未能解决你的问题,请参考以下文章
Java中Access restriction:····的解决方法
关于Access restriction: The type 'Application' is not API (restriction on required library)(示例
Access restriction required library rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on require
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra
Access restriction: The method 'CharacterEncoder.encode(byte[])' is not API...