Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法

2023-05-31,,

The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问。

解决办法

1.选中项目->右键->进入Properties视图,选中Java Build Path->点击Libraries->展开JRE System Library[JavaSE-1.6],选中Access rules这一项。如图:

2.Edit->点击Add->在Rule Pattern(规则式样)编辑你允许导入的类库,如(org/**),允许就是在Resolution选项中选中Accessible(当然,有些项目需要可以选择Forbidden、Discourage某些类库)

参考网址:http://blog.sina.com.cn/s/blog_4a40b8530100ufli.html

Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法的相关教程结束。

《Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法.doc》

下载本文的Word格式文档,以方便收藏与打印。