Dev@Free

          zJun's Tech Weblog

          [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files錯(cuò)誤.....

          來(lái)自: i have only belief--wjw



          在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files錯(cuò)誤.....,查找的解決辦法如下:

          一:
          It is indirectly referenced from required .class file

          原因:你正要使用的類(lèi)調(diào)用了另一個(gè)類(lèi),而這個(gè)類(lèi)又調(diào)用了其他類(lèi),這種關(guān)系可能會(huì)有好多層。而在這個(gè)調(diào)用的過(guò)程中,某個(gè)類(lèi)所在的包的缺失就會(huì)造成以上那個(gè)錯(cuò)誤。

          解決方法:導(dǎo)入缺失的包

          二:
          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

          出現(xiàn)以上訊息的原因是因?yàn)槟阊b了多個(gè)版本的jre或jdk的關(guān)係。本來(lái)Eclipse在建立專(zhuān)案時(shí),會(huì)自動(dòng)參照你的jre路徑,但多個(gè)版本就沒(méi)辦法了。
          你只能手動(dòng)建立…
          1. 進(jìn)入window\preferences\java\Installed JREs
          1)按Add
          2)輸入JRE Name, 例JDK1.5.0.03
          3)JRE home directory, 選擇安裝的路徑
          4)按OK
          2. 進(jìn)入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帛羅閣 閱讀(100612) 評(píng)論(3)  編輯  收藏 所屬分類(lèi): 開(kāi)發(fā)環(huán)境

          評(píng)論

          # re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files錯(cuò)誤..... 2013-09-05 11:29 陳軍

          對(duì)我有幫助的分析  回復(fù)  更多評(píng)論   

          # re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files錯(cuò)誤..... 2014-01-02 10:29 深藏功與名

          牛逼  回復(fù)  更多評(píng)論   

          # re: [Eclipse] The type XXX cannot be resolved. It is indirectly referenced from required .class files錯(cuò)誤..... 2015-04-15 17:44 受益者

          萬(wàn)分感謝!!  回復(fù)  更多評(píng)論   

          導(dǎo)航

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

          統(tǒng)計(jì)

          常用鏈接

          留言簿(15)

          隨筆分類(lèi)

          隨筆檔案

          相冊(cè)

          收藏夾

          博客

          文檔

          站點(diǎn)

          論壇

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 镇江市| 依兰县| 宕昌县| 福贡县| 营山县| 景洪市| 博野县| 昌乐县| 台前县| 洛阳市| 留坝县| 兴义市| 昌吉市| 苗栗县| 周至县| 巴南区| 郎溪县| 宁城县| 乌海市| 昭苏县| 定州市| 兰州市| 湖口县| 林甸县| 马边| 资溪县| 安新县| 习水县| 平遥县| 敦煌市| 安庆市| 岑溪市| 马龙县| 定州市| 黄石市| 兴业县| 镇远县| 从江县| 井研县| 马龙县| 灵山县|