首页 > 代码库 > [转]解决Access restriction: The type * is not accessible due to restrict
[转]解决Access restriction: The type * is not accessible due to restrict
我在eclipse使用org.omg下的东西的时候报此错误
我用的第一种方法解决了问题
转自:http://blog.sina.com.cn/s/blog_6714fba70100x6mz.html
Access restriction: The type TaskTopicResolver is not accessible due to restrict
做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可行。。。我只是我的,具体每个的差别没研究,谁有研究 给个消息
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。