最近导入新项目,导入所有用到的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 保存


posted on 2018-06-11 11:04  刘达人186  阅读(128)  评论(0编辑  收藏  举报