我在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. kibana-sentinl-监控报警

    kibana 安装 sentin 插件 ./bin/kibana-plugin install https://github.com/sirensolutions/sentinl/releases/d ...

  2. InfluxDB写流程

    Influxdb version1.8 HTTP: 0x00000000016d0ce3 in github.com/influxdata/influxdb/coordinator.(*PointsW ...

  3. delphi 自定义内存管理

    1.主要通过GetMemoryManager来hook原来的内存管理. 2.通过SetMemoryManager来设置你自己的新的内存管理,可以用一个内存池来优化和管理程序的内存调用情况. proce ...

  4. BS中保存参数

    开发中经常需要将值存起来,当点击某一项时以便知道点击了哪一项. 一:应用JS页面跳转(牛腩中讲到) HTML: <td class="txt c"><a href ...

  5. 2018.1.9 博客迁移至csdn

    http://blog.csdn.net/liyuhui195134?ref=toolbar

  6. elastic不错的官方文档(中文)

    https://www.blog-china.cn/template/documentHtml/1484101683485.html http://www.open-open.com/doc/list ...

  7. 做一个创建cocos2d-x新项目的shell脚本

    1. 进入console目录 cd /Users/apple/Documents/MyArchitecture/Cocos2d-x/Framework/cocos2d-x-3.4/tools/coco ...

  8. mysql中select distinct的使用方法

    在使用mysql时,有时须要查询出某个字段不反复的记录,尽管mysql提供有distinct这个keyword来过滤掉多余的反复记录仅仅保留一条,但往往仅仅用它来返回不反复记录的条数,而不是用它来返回 ...

  9. jBoss无法通过IP地址访问,只能用localhost\127.0.0.1访问

    http://feng88724.iteye.com/blog/263211 JBOSS版本:4.2.2GA 症状:服务器无法通过IP地址去访问,只能用127.0.0.1或者localhost来访问. ...

  10. R快速创建个文件

    cat("TITLE extra line", "2 3 5 7", "11 13 17", file="ex.data" ...