The type handler is not accessible due to restriction on required library rt.jar
来源:互联网 发布:.net程序员面试秘笈 编辑:程序博客网 时间:2024/04/27 20:12
参考:http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar
【报错】
multiple markers at this line
Access restriction: the constructor Handler() is not accessible due to restriction on required library c:\program files\java\jre7\lib\rt.jar
Access restriction: the type handler is not accessible due to restriction on required library c:\program files\java\jre7\lib\rt.jar
【解决】
- 工程 -> Build Path -> Configure Build Path -> Libraries
- 删除 JRE System Library
- Add libraray -> 重新添加 JRE System Library
【解释】
StackOverflow: This works because you have multiple classes in different jar files. Removing and re-adding the jre lib will make the right classes be first. If you want a fundamental solution make sure you exclude the jar files with the same classes.
因为工程使用的多个jar中的多个class是同样的class,但其中只有一个是正确的class。删除JRE library再重新添加它,会让Eclipse找到正确的class。更彻底的解决方法是,定位并明确摒弃不正确的同名class。
- The type handler is not accessible due to restriction on required library rt.jar
- 类似 XXX is not accessible due to restriction on required library jre7 rt.jar 的问题
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- 解决Access restriction: The type XXXX is not accessible due to restriction on required library
- Access restriction: The type is not accessible due to restriction on required library问题处理
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- Access restriction: The type JPEGCodec is not accessible due to restriction on required library
- Access restriction: The type BASE64Encoder is not accessible due to restriction on required library
- Access restriction: The type XXXX is not accessible due to restriction on required library
- Access restriction: The type BMPImageReader is not accessible due to restriction on required library
- Access restriction: The type XXX is not accessible due to restriction on required library
- Access restriction: The type JPEGCodec is not accessible due to restriction on required library
- access restriction: The type * is not accessible due to restriction on required library
- Access restriction: The type JFrame is not accessible due to restriction on required library
- Access restriction: The type BASE64Decoder is not accessible due to restriction on required library
- Access restriction: The type XXXX is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction: The type XXX is not accessible due to restriction on required library XXX
- 在ubuntu上安装eclipse报错
- 算法----约瑟夫环的简易实现
- oracle基本知识
- Java集合框架
- ubuntu运行windows程序
- The type handler is not accessible due to restriction on required library rt.jar
- Makefile常用万能模板(包括静态链接库、动态链接库、可执行文件)
- Ubuntu12.04 root用户登录设置
- Eclipse断点调试
- 基于xmpp openfire smack开发之openfire介绍和部署[1]
- PAT_1001
- [LeetCode]—Permutations II 求全排列(有重复值)
- 基于xmpp openfire smack开发之Android客户端开发[3]
- 一个例子程序对常量指针的理解