Dev@Free

zJun's Tech Weblog

[Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....

来自: i have only belief--wjw



在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下:

一:
It is indirectly referenced from required .class file

原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。

解决方法:导入缺失的包

二:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

出現以上訊息的原因是因為你裝了多個版本的jre或jdk的關係。本來Eclipse在建立專案時,會自動參照你的jre路徑,但多個版本就沒辦法了。
你只能手動建立…
1. 進入window\preferences\java\Installed JREs
1)按Add
2)輸入JRE Name, 例JDK1.5.0.03
3)JRE home directory, 選擇安裝的路徑
4)按OK
2. 進入Project\properties\Java Bulid Path
1)Add library
2)選JRE System Library後按Next
3)選workplace default JRE後按finish...

posted on 2007-10-16 20:55 zJun's帛罗阁 阅读(100446) 评论(3)  编辑  收藏 所属分类: 开发环境

评论

# re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files错误..... 2013-09-05 11:29 陈军

对我有帮助的分析  回复  更多评论   

# re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files错误..... 2014-01-02 10:29 深藏功与名

牛逼  回复  更多评论   

# re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files错误..... 2015-04-15 17:44 受益者

万分感谢!!  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2014年1月>
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

统计

常用链接

留言簿(15)

随笔分类

随笔档案

相册

收藏夹

博客

文档

站点

论坛

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜