運行java+eclipse報錯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


1eclipse運行java報錯

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

 module tp10: java.lang.NoClassDefFoundError

如下圖:

 

 

 

Eclipse版本:2018-12

Java版本:12.0.1

解決方法:

1、安裝jre。在jdk下運行

bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre

2、eclipse通過window-》Preferences-》Java-》Installed JREs添加或編輯已安裝的jre路徑

 

再次運行,就可以啦。

                            


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM