引用rt.jar中的一个类,结果发生了标题中的错误
"Access restriction: The type XXX is not accessible due to restriction on required library c:\jdk\jre\lib\rt.jar "
这个类应该没有什么问题的,估计是eclipse编译器的问题,网上查资料,发现eclipse中此类的问题不少,摘录一篇解决方法:
http://blog.csdn.net/hexin373/article/details/7175325
ibrary C:\Program Files\Java\jdk\jre\lib\ext
\jdsmsserver-3.4.jar
google了一下 下面是解决方法
Eclipse 默认把这些受访问限制的API设成了ERROR。只要把Windows-Preferences-Java-Complicer- Errors/Warnings里面的Deprecated
and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。
不过这个不好
如果你的jre目录里面有你项目需要引用的jar包
而你又引用了外部jar包
也就是说引用了两次
如果你想让起作用的是手动引用的外部jar包 这个时候需要把 "Referenced Library" 调整到 "JRE System Library"上面
引用的顺序是从上到下
改变顺序前的效果:
build path
最后效果
OK 一切正常...
|
分享到:
相关推荐
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。只要...
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 ...
1. Access restriction:在Eclipse中编写Java代码时,使用了BASE64Decoder,但Eclipse提示:Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program ...
在错误信息中,我们看到 "Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar",这表明你尝试访问的 `JPEGCodec` 类受到了...
然而,在使用Eclipse开发环境中导入这两个类时,可能会遇到访问限制错误:“Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt...
但是,有时引入这两个包时会报出错误:`Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:/Java/jre1.6.0_07/lib/rt.jar`。 解决方法一:修改全局属性 ...
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar ``` **解决方案:** 1. **调整Eclipse配置**:Eclipse默认将这些受...
To connect, and example command would be: SMcliDSSM_335_V4_pkg.bat localhost (note: the SMcliDSSM_335_V4_pkg.bat has a 10 parameter restriction on the initial call, linux .sh file has no such ...
Humble Key Restriction 描述 查看 Humble Bundle Key 的激活激活限制插件 它能帮你在 Humble 的 Download 界面显示 Key 的激活限制信息。 安装 安装 (推荐)、 或者其它用户脚本管理工具 安装脚本 就可以用啦 XD ...
Based on the given title, description, tags, and partial content, we can extract several important IT-related knowledge points about the DW1000 Integrated Circuit (IC) and its compliance with the ...
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 ...
例如,当尝试导入一个项目时,可能会出现以下错误提示:“Access restriction: The type And is not accessible due to restriction on required library C:\Program Files (x86)\Java\jdk1.5.0_09\jre\lib\rt.jar”...
except where such Software is embedded in a manner not readily accessible to the end user. Licensee acknowledges that any symbols, trademarks, BASLA v1.1 5/29/02 -1- tradenames, and service marks ...
节点车辆限制 计算车辆限制规则安装$ npm install vehicle-restriction特征 正常化的板弦 测试车辆的车牌是否受到限制 显示哪个车牌号码受到限制 支持更多城市例子const vr = require ( 'vehicle-restriction' ) ;...
restriction to Microsoft's Visual Studio .NET. .Net fails to import indexed properties that reside at the root level of an ActiveX Control. The property has been replaced by a method of the same...
安装将此行添加到您的应用程序的Gemfile中: gem 'ip_restriction' 然后执行: $ bundle或将其自己安装为: $ gem install ip_restrictionRuby on Rails的用法使用IP列表创建yml文件。 IPV4或IPV6 ips : - 10.20....
当出现"Access restriction: Class is not accessible due to restriction on required library"错误时,这通常是因为Eclipse的访问限制规则。要解决这个问题,可以通过以下步骤将错误级别改为警告: - `Windows -...
java *** MIT License ... Permission is hereby granted, free ...copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copy