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. C++ 知道虚函数表的存在

    今天翻看陈皓大大的博客,直接找关于C++的东东,看到了虚函数表的内容,找一些能看得懂的地方记下笔记. 0 引子 类中存在虚函数,就会存在虚函数表,在vs2015的实现中,它存在于类的头部. 假设有如下 ...

  2. IHttpHandler防止图片链接被盗用

    public class JpegHandler : IHttpHandler { public bool IsReusable { get { return true; } } public voi ...

  3. CDH5.4.5运行Phoenix导入CSV文件

    1.安装phoenix 在界面上设置Phoenix的parcel包: http://52.11.56.155:7180/cmf/settings?groupKey=config.scm.parcel. ...

  4. JS日期类型处理

    Date 操作日期和时间的对象 Date.getDate( ) 返回一个月中的某一天 Date.getDay( ) 返回一周中的某一天 Date.getFullYear( ) 返回Date对象的年份字 ...

  5. 如何在网页中调用百度地图api

    我想在木有提供地图接口的年代,前端工程师门要么只写上企业的具体地址,要么就是用一张标有自己位置的地图图片.但是现在不一样啦!为了增强用户体验,谷歌,甚至百度都很开放了,你可以在他们的网站上找到地图接口 ...

  6. 在WPF中获取DataGridTemplateColumn模板定义的内容控件

    xaml格式描述: <DataGrid Name="dataGrid" Grid.Row="1" ItemsSource="{Binding}& ...

  7. Python的平凡之路(16)

    一.HTML+CSS补充 0.常用页面布局 <!DOCTYPE html> <html lang="en"><head> <meta ch ...

  8. CI关于自动加载

    /application/config/autoload.php文件中定义自动加载的包.类库.helper.用户配置文件.语言文件.模块 类库会到/application/libraries目录或/s ...

  9. SparkMLlib之 logistic regression源码分析

    最近在研究机器学习,使用的工具是spark,本文是针对spar最新的源码Spark1.6.0的MLlib中的logistic regression, linear regression进行源码分析,其 ...

  10. Fragment的使用(二)

    动态添加Fragment 将MainActivity的布局文件中的两个Fragment的代码注释掉.在MainActivity的java文件中添加如下代码: package com.cm.myfrag ...