Eclipse 軟件 解決:出現的 editor does not contain a main type
錯誤框 問題
當你運行 Java文件是,如果彈出了下面的 錯誤框:
出現錯誤的原因: 當前的源代碼(所有的包)沒有被添加到build path中:(src路徑里面是文件目錄的樣子)
解決方法: 對着:src 路徑右鍵 -> Build Path -> Use as Source Folder
現在,src路徑 應該是下面這個樣子的:(不再是文件目錄的樣子了,而是Java包的樣子)
搞定,現在在運行程序,eneditor does not contain a main type
錯誤框就不會在出現了。
參考網站:
使用eclipse運行帶有main函數的Java文件時,出現editor does not contain a main type的錯誤框
http://blog.csdn.net/zt689/article/details/22161909