Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
2014-08-19 21:51
411 查看
错误信息:
Access restriction: The constructor SunJCE() is not accessible due to restriction on required library C:\Program Files \Java\jre7\lib\ext\sunjce_provider.jar
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不行,治标不治本。我也是用的方案二解决的,应该是路径问题,重新添加路径应该就对了。
相关文章推荐
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第二种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第一种,OK。
- Access restriction: The type * is not accessible due to restrict,报错问题.
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type * is not accessible due to restrict,报错问题
- Access restriction: The type TaskTopicResolver is not accessible due to restrict
- Eclipse:No fixes avaliable for 'Access restriction: The type basic is not accessible due to restrict
- Access restriction: The type is not accessible due to restriction on required library问题处理
- [转]解决Access restriction: The type * is not accessible due to restrict
- 杂(一): Access restriction: The type * is not accessible due to restrict
- Access restriction: The type * is not accessible due to restrict
- 关于“The type *** is not accessible due to restriction on required library”问题的解决
- Access restriction:The type JPEGCodec is not accessible due to restriction问题解决
- Android问题:Java基础问题Access restriction: The type JOptionPane is not accessible due to restriction……
- 关于“The type **** is not accessible due to restriction on required library”问题的解决