`

[Eclipse] Access restriction: Class is not accessi

    博客分类:
  • OSGI
阅读更多
By Kamal Mettananda
Published: 09 September 2008
"Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE . Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.

How to solve

This error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.
  • Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
  • (Project) Properties -> Java Compiler -> Errors/Warnings
Locate the "Forbidden reference (access rules)" option under "Deprecated and restricted API " section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error messages.

"Warning" or "Ignore" options will only hide the potential issue in the project, by allowing the project to use any classes ignoring predefined access rules. To completely resolve this issue, analyze the project and located the use of restricted classes and take necessary actions (either remove those references or access rules).
分享到:
评论

相关推荐

    sun.misc.base64decoder.jar下载

     Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program  files\java\jre6\lib\rt.jar  Access restriction : The constructor BASE64Decoder() is ...

    import com.sun.image.codec.jpeg.JPEGImageEncoder;包的下载

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要...

    java识别验证码.docx

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要把...

    解决eclipse导入rt包问题

    在Eclipse中处理图片,需要引入两个包: ...Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 解决方法就在这里

    Humble-Key-Restriction::cooking:Humble Bundle 锁区 Key 查看脚本

    Humble Key Restriction 描述 查看 Humble Bundle Key 的激活激活限制插件 它能帮你在 Humble 的 Download 界面显示 Key 的激活限制信息。 安装 安装 (推荐)、 或者其它用户脚本管理工具 安装脚本 就可以用啦 XD ...

    ip_restriction:创建IP白名单的简单方法

    安装将此行添加到您的应用程序的Gemfile中: gem 'ip_restriction' 然后执行: $ bundle或将其自己安装为: $ gem install ip_restrictionRuby on Rails的用法使用IP列表创建yml文件。 IPV4或IPV6 ips : - 10.20....

    node-vehicle-restriction:计算车辆限制规则

    节点车辆限制 计算车辆限制规则安装$ npm install vehicle-restriction特征 正常化的板弦 测试车辆的车牌是否受到限制 显示哪个车牌号码受到限制 支持更多城市例子const vr = require ( 'vehicle-restriction' ) ;...

    alcohol_restriction:确定购买酒精的年龄和适当的限制

    酒精限制 确定年龄和购买酒的适当限制。

    Mimella: C++ Class Library for Mail Programming

    to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit ...

    应用程序限制器 - App Restriction v2.6.0

    App Restriction是一款可以定期清理后台应用,释放内存,节省电池电量的系统清理优化神器。 现在的流氓应用越来越多,动不动就常驻后台,杀还杀不掉,消耗内存,消耗电池。 这个工具专杀流氓应用,并且定期清理它们...

    Sortable前端框架

    unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering. This option sets the minimum pointer movement that must occur before the delayed sorting is ...

    Simple Software-restriction Policy:控制可以从中运行程序的文件夹。-开源

    软件策略是对Microsoft Windows恶意软件保护的有力补充。 特别是,它比传统的安全方法更有效地抵御勒索软件。 如果您知道Linux的“执行权限”位,那么您将了解它的用途。 操作模式有所不同,因为执行权限是授予...

    SQL Server Data Access Components 2.45.22 for d6

    Only TMSConnectDialog component requires Forms unit.Trial version restrictions--------------------------Note following restriction when using SDAC trial version.When SDAC based application is running...

    List of harmonised and national restriction codes.pdf

    欧洲铁路局车辆使用限制条件编码

    A restriction of the fourier transform

    the restriction theorem

    51CTO下载-DSSM335V4.part1

    Note: If the Demo does not start, be sure that the Demo Configuration Editor is not running and there are not any other demos running. If you copied the demo package directory, make sure the DSSM_335...

    NGUI Next-Gen UI v3.0.6

    - FIX: Drag handles will now hide if there is not enough space to draw them. - FIX: Anchors and stretch scripts set to "run only once" will still respond to screen size changes. - FIX: Switching panel...

    Universal-USB-Installer

    want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is ...

    a-pdf Restriction.Remover.v1.6.9.010

    顶级pdf文件处理工具,可以有效消除pdf文档的诸多应用(例如:打印、复制粘贴等)限制。 原创优质资源,互联网独此一份,非常值得珍藏。只要下载,绝对不会后悔。

Global site tag (gtag.js) - Google Analytics