我在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. 在ios程序中自己主动滚动TableView到某行的方法

    比方tableview窗体能够显示 30 行, 我想在填充tableview 100 条数据后 选择第 50行, 能把这一行显示到窗体内, 就像手动拖滚动栏到 第 50行一样,要怎样实现呢? ] an ...

  2. 判断客户端是PC还是手持设备的JS代码【转】

    1.第一种: 复制代码代码如下: function IsPC() {    var userAgentInfo = navigator.userAgent;    var Agents = [&quo ...

  3. HashMap、LinkedHashMap和TreeMap对比

    共同点: HashMap,LinkedHashMap,TreeMap都属于Map:Map 主要用于存储键(key)值(value)对,根据键得到值,因此键不允许键重复,但允许值重复. 不同点: 1.H ...

  4. http://blog.csdn.net/a9529lty/article/details/6454156

    http://blog.csdn.net/a9529lty/article/details/6454156

  5. POJ 1275-Cashier Employment(差分约束系统)

    题目地址:id=1275">POJ 1275 题意: 给出一个超市24小时各须要R[i]个雇员工作,有N个雇员能够雇佣.他们開始工作时间分别为A[i],求须要的最少的雇员人数. 思路: ...

  6. 解决Oracle在Linux下Listener起不来,error 111错误

    近来发生一个问题有点头疼,在linux上的Oracle数据库突然无法访问 主要报错如下: 基于本人的走歪路经验,分享一下我的解决思路: 首先,最直观的一点,监听器起不来,是不是数据库本身就没起来 se ...

  7. [Angular] Extract Implementation Details of ngrx from an Angular Application with the Facade Pattern

    Extracting away the implementation details of ngrx from your components using the facade pattern cre ...

  8. SVG路径字符串格式

    命令 名称 参数 M 移动到(moveTo) (x y)+ Z 闭合路径(closepath) (none) L 直线(lineTo) (x y)+ H 水平直线 x+ V 垂直直线 y+ C 曲线( ...

  9. iOS exit(),abort(),assert()函数区别

    iOS exit(),abort(),assert()函数区别 exit() 退出程序 abort() 停止程序, assert()检查里面的参数如果为nil抛出异常:

  10. Bitmap和Drawable的互相转换

    刚好之前的项目实用到.怕遗忘了.就先记录下来.然后会用到的时候直接来这copy使用就好了. 1.Bitmap ---->Drawable: public static Drawable bitm ...