温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Access restriction: The type * is not accessible due to restrict报错有关问题

发布时间:2020-08-09 10:25:23 来源:ITPUB博客 阅读:272 作者:linmenglan1 栏目:编程语言
Access restriction: The type * 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 

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI