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. Adapter 代码中启动报错

    安装好Adapter之后,在designer中可以启动Adapter,但在代码中启动却总是报错,“could not create RVMQSession"或者是“native implem ...

  2. React Native 组件样式测试

    View组件默认样式(注意默认flexDirection:'column') {flexGrow:0,flexShrink:0,flexBasis:'auto',flexDirection:'colu ...

  3. Linux学习 : 自己写bootloader

    一.bootloader 目标:启动内核 基本功能: ①初始化硬件:关看门狗.设置时钟.设置SDRAM.初始化NAND FLASH ②image比较大需要重定位到SDRAM ②将内核从NAND FLA ...

  4. Longest Substring Without Repeating Characters (c#)

    Given a string, find the length of the longest substring without repeating characters. For example, ...

  5. i2c之at24c08驱动及应用程序

    1-->修改板级文件arch/arm/mach-s3c2440/mach-mini2440.c 步骤: ->添加引用 #include <linux/i2c.h> ->添 ...

  6. linux 常用操作指令(随时更新)

    ls: 查看当前目录下文件列表 -l   列出文件详细信息l(list)  -a   列出当前目录下所有文件及目录,包括隐藏的a(all) mkdir         创建目录 -p         ...

  7. 关于升级xcode8

    升级xcode8已是必然,升级ios10的用户不能说大有人在,应该也不会少,如果不升级xcode8,上架最新的包,那么可能应用在ios10 上是不支持的.so,这些xcode8的新特性,你应该了解!! ...

  8. Spearman秩相关系数和Pearson皮尔森相关系数

    1.Pearson皮尔森相关系数 皮尔森相关系数也叫皮尔森积差相关系数,用来反映两个变量之间相似程度的统计量.或者说用来表示两个向量的相似度. 皮尔森相关系数计算公式如下:

  9. HTML5 <video> - 使用 DOM 进行控制

    HTML5 <video> 元素同样拥有方法.属性和事件. 其中的方法用于播放.暂停以及加载等.其中的属性(比如时长.音量等)可以被读取或设置.其中的 DOM 事件能够通知您,比方说,&l ...

  10. sql 聚合函数、排序方法详解

    聚合函数 count,max,min,avg,sum... select count (*) from T_Employee select Max(FSalary) from T_Employee 排 ...