我在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. asp.net Mvc Area 找到多个与名为相同的控制器匹配的类型 请通过调用含有“namespaces”参数

    MVC中的Area的区域的时候,在一个Area中定义了一个Home控制器,在启动的时候, 找到多个与名为"Home"的控制器匹配的类型.如果为此请求("{controll ...

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

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

  3. 完美解决“find: 路径必须在表达式之前:”

    使用find命令查找文件的时候会有如题的提示,只需略作修改即可.两种方法: ①可cd到其它目录再查找(当前目录下存在要查找的目标文件时会出现此类错误,换到其它目录下再执行相同的命令即可): ②如果目标 ...

  4. nginx搭建前端项目web服务器以及利用反向代理调试远程后台接口

    前端同学用nginx搭建自己的web服务器,后台程序专门部署在一台服务器上(我们之前公司就有三套环境,开发/测试/生产),这样做的好处是 1.前端代码基本都是静态文件,重启一次很快,也就几秒钟时间. ...

  5. tomcat 部署 RESTful 服务实例

    1.建立简单restfule服务 参考:java 利用JAX-RS快速开发RESTful 服务实例 简单代码: package com.example; import javax.ws.rs.GET; ...

  6. 转:用十条命令在一分钟内检查Linux服务器性能

    转自:http://www.infoq.com/cn/news/2015/12/linux-performance?utm_campaign=rightbar_v2&utm_source=in ...

  7. linux中添加开机自启服务的方法

    往文件/etc/rc.d/rc.local中追加内容即可,如: /mongodb/start_mongoDB.sh

  8. wtforms 提示 中文 flask

    #! /usr/bin/python3 # -*- coding: utf8 -*-   from wtforms.fields.simple import TextField, PasswordFi ...

  9. SpringMVC请求参数接收总结

    前提 在日常使用SpringMVC进行开发的时候,有可能遇到前端各种类型的请求参数,这里做一次相对全面的总结.SpringMVC中处理控制器参数的接口是HandlerMethodArgumentRes ...

  10. Android Exception 12(has leaked ServiceConnection)

    09-09 15:12:31.154: E/ActivityThread(18855): Activity com..xxx.xx.act.LoadingAct has leaked ServiceC ...