`
kevin-qingzhan
  • 浏览: 83942 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

The type XXX cannot be resolved. It is indirectly referenced from required .clas

阅读更多
Posted on 2007-08-02 10:00 i have only belief 阅读(5376) 评论(7)  编辑 收藏 引用 所属分类: JAVA(JSP) 
       遇到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...


三、
问题解决之道在于 将jsp-api.jar加入到类路径.


最近,在Eclipse中导入其他项目,总是报下面2个错误。将项目所需的jar都引入了。依然还存在这个问题。

1.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

2.The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

解决办法:
1.将JRE先remove掉,然后重新引入JRE即可。(Project->properties->Java Bulid Path )
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics