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就可以编译通过了。
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就可以编译通过了。
相关文章推荐
- Access restriction: The method XXX from the type XXX is not accessible due to restriction XXX
- The method encode(byte[]) from the type CharacterEncoder is not accessible due to restriction on req
- Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library
- The method decodeBuffer(String) from the type CharacterDecoder is not accessible due to restriction
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- Access restriction: The type XXX is not accessible due to restriction on required library XXX(转载)
- Access restriction: The type XXX is not accessible due to restriction on required library
- The method decodeBuffer(String) from the type characterDecoder is not accessible due to ...
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- Access restriction: The type XXX is not accessible due to restriction on required lib
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
- Access restriction: The type JFrame is not accessible due to restriction on required 错误
- 转:[Java] Access restriction: The type FtpClient is not accessible due torestriction on required libr
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
- Access restriction: The type JPEGImageEncoder is not accessible due to restriction
- Access restriction: The type Resource is not accessible due to restriction on required library
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
- Access restriction: The type Resource is not accessible due to restriction on required library
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案