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”问题的解决办法的更多相关文章

  1. 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library

    在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...

  2. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...

  3. (Error) The type AESKeyGenerator is not accessible due to restriction on required library.

    error for 'Access restriction: The type AESKeyGenerator is not accessible due to restriction on requ ...

  4. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

  5. 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  6. 报错: The type ByteInputStream is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  7. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  8. The constructor BASE64Encoder() is not accessible due to restriction on required library

    在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:Access restriction : T ...

  9. not accessible due to restriction on required library

    The type AWTUtilities is not accessible due to restriction on required library D:\Program Files\jdk1 ...

随机推荐

  1. Android调用系统照相机

    ndroid调用系统相机实现拍照功能 在实现拍照的功能时遇到了很多问题,搜索了很多资料,尝试了很多办法,终于解决了,下面简要的描述下在开发过程中遇到的问题. 虽然之前看过android开发的书,但是没 ...

  2. javascript如何用户的判断操作系统

    <script> alert(window.navigator.userAgent); if(window.navigator.userAgent.indexOf("Window ...

  3. js判断是否是移动端 访问移动端网址

    1以下为代码,可放置在网站foot底部文件,或者haead顶部文件,建议将代码放在网站顶部,这样可以实现手机访问立即跳转! <script src="http://siteapp.ba ...

  4. Apache安装与属性配置

    Apache 事先创建进程 按需维持适当的进程 模块块设计,核心比较小,各种功能都模块添加(包括php) 支持运行配置,支持单独编译模块 支持多种方式的虚拟主机配置         Socket IP ...

  5. 关于setInterval() 和setTimeout()的使用

    参照W3C标准: setInterval() 方法 使用对象为 HTML DOM Window 对象 定义和用法 setInterval() 方法可按照指定的周期(以毫秒计)来调用函数或计算表达式. ...

  6. 6、Concurrent-Mark-Sweep

    1.cms 主要用于年老代垃圾回收 2.这玩意牺牲通吐量换取最短垃圾回收时间 3.有的地方说是四个阶段,有的地方说五个阶段,还有六个阶段的,真相是----我也不知道 四个阶段: Initial mar ...

  7. android-studio的gradle plugin配置相关的一些记录

    感觉就是越高的Gradle版本对应的plugin越高. 你妹的,是不是2.10版本低于2.2版本,我还以为是2.10版本高于2.8.2.9版本呢.每次用2.10版本构建,用1.2.2等都不行.提示最低 ...

  8. 怎么把jdk和jRE的Javadoc文档整合到MyEclipse

    有时在写代码时,需要查看javadoc文档,便于编写程序.故如何把Javadoc文档整合到MyEclipse,以便于查看呢? 解决办法: 1.在MyEclipse中菜单栏的“Windows”---&g ...

  9. AngularJs的UI组件ui-Bootstrap分享(七)——Buttons和Dropdown

    在ui-Bootstrap中,Buttons控件和Dropdown控件与form表单中的按钮和下拉框名字很像,但实际上这两个控件有新的含义. 先说Buttons,它是一组按钮,用来实现form表单中的 ...

  10. 使用jQuery,实现完美的表单异步提交

    jQuery异步提交表单 <form id="form1" method="post"> <table border="1" ...