我在eclipse使用org.omg下的东西的时候报此错误

我用的第一种方法解决了问题

转自:http://blog.sina.com.cn/s/blog_6714fba70100x6mz.html

做NC的时候从别人那拷了个NC_DEMO结果我这报错他那没报错 
import nc.bs.wfengine.engine.ext.TaskTopicResolver;

报错信息:Access restriction: The type TaskTopicResolver is not accessible due to restriction on required library NC_DEMO/NC_HOME/modules/uap/META-INF/lib/uapplatform.jar

解决方案1:

Eclipse 默认把这些受访问限制的API设成了ERROR。 
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> 
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning

解决方案2: 
只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。

解决方案3:

工程上右键->工程属性->java builder path->Libraries标签,点击JRE System Library里面的Access rules,add sun/** 为accessible,如果该项存在,就edit。

解决方案4:

Windows -> Preferences -> Java -> Installed JREs -> 选择用的JDK -> Edit -> Add External JARs

俺试了下1,4可行。。。我只是我的,具体每个的差别没研究,谁有研究 给个消息

[转]解决Access restriction: The type * is not accessible due to restrict的更多相关文章

  1. Access restriction: The type * is not accessible due to restrict,报错问题

    解决方案1: Eclipse 默认把这些受访问限制的API设成了ERROR.  Windows -> Preferences -> Java -> Compiler -> Er ...

  2. Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案

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

  3. 怎么在eclipse中查到这个类用的是哪个jar的类和Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案

    找到了一个办法,你先按F3,然后点击Change Attached Source..按钮,在弹出的框里有个路径,我的路径是D:/SNFWorkSpace/JAR/~importu9.jar,然后你去引 ...

  4. 解决:高版本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 ...

  5. 关于Access restriction: The type 'Application' is not API (restriction on required library)

    原文链接:http://rxxluowei.iteye.com/blog/671893 今天写第一次写JavaFX的入门程序就GG 遇到了导入API的问题,无奈疯狂地通过网络找解决方案.. 我的问题是 ...

  6. Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法

    The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...

  7. 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重新加入. ===== ...

  8. Access restriction: The type 'BASE64Encoder'

    Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'D:\Java\jd ...

  9. Java,AWTUtilities,eclipse报编译错误:Access restriction: The type 'AWTUtilities' is not API (restriction on required library 'C:\Program Files\Java\jre7\lib\rt.jar')

    [场景]调用com.sun.awt.AWTUtilities时,eclipse提示编译错误: Access restriction: The type 'AWTUtilities' is not AP ...

随机推荐

  1. 流畅的python第十八章使用asyncio包处理并发

    对比一个简单的多线程程序和对应的 asyncio 版,说明多线程和异步任务之间的关系asyncio.Future 类与 concurrent.futures.Future 类之间的区别摒弃线程或进程, ...

  2. [GLSL]着色器周记02——火焰特效 【转】

    http://www.cnblogs.com/tkgamegroup/p/4214081.html 这周学了好多.包括伪随机数.柏林噪声.先说伪随机数.伪随机数我们用的是周期函数而不是那种由前一项乘一 ...

  3. Indirect Buffers

    间接cmd 用在 gpu建立的cmd 不需要cpu参与 用indirect cpu gpu就不会互相等待了 直接gpu建立了 gpu用 之前的cmd是cpu建立 填入数据 gpu拿来执行的 在meta ...

  4. 在MySQL中使用子查询和标量子查询的基本用法

    一.MySQL 子查询 子查询是将一个 SELECT 语句的查询结果作为中间结果,供另一个 SQL 语句调用.MySQL 支持 SQL 标准要求的所有子查询格式和操作,也扩展了特有的几种特性.子查询没 ...

  5. Struts2实现登录流程

    本节将演示一个基本的登录流程,在登录界面中若输入正确的用户名和密码,跳转到登录成功界面:否则路转到登录失败界面. 1 建立一个名为LoginDemo的动态Web项目 2 添加struts2相关的jar ...

  6. Android面试题(1)

    1. 下列哪些语句关于内存回收的说明是正确的? (b ) A. 程序员必须创建一个线程来释放内存 B. 内存回收程序负责释放无用内存 C. 内存回收程序允许程序员直接释放内存 D. 内存回收程序可以在 ...

  7. Windows录音API学习笔记

    Windows录音API学习笔记 结构体和函数信息  结构体 WAVEINCAPS 该结构描述了一个波形音频输入设备的能力. typedef struct { WORD      wMid; 用于波形 ...

  8. Gstreamer学习

    Gstreamer学习笔记----Gstreamer架构设计思想 http://blog.csdn.net/tx3344/article/details/7497434 Gstreamer到底是个啥? ...

  9. webDriver API——第5部分Special Keys

    The Keys implementation. class selenium.webdriver.common.keys.Keys Bases: object Set of special keys ...

  10. PKCS7 的 attached 和 detached 方式的数字签名

    搜遍了整个网络,都没有详细的说明.只在一个页面上有介绍,还模棱两可的,地址是:http://docs.oracle.com/cd/E19398-01/820-1228/gfnmj/index.html ...