您的位置:首页 > 产品设计 > UI/UE

Access restriction: The method XXX from the type XXX is not accessible due to restriction XXX

2013-07-23 18:21 375 查看
插件重构的时候 遇到这个问题

Access restriction: The method setDefaultAutoCommit(boolean) from the type BasicDataSource is not accessible due to restriction on required library com.XXX.ro.studio.debug/lib/commons-dbcp-1.2.1.jar

开始以为是插件包之间依赖问题,但是查看一下却没有问题。

后来发现是eclipse本身设置的问题

它默认把这些受访问限制的API设成了ERROR,只要把Windows-Preferences-Java-Complicer-Errors/Warnings

里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐