Eclipse不能編譯Java文件?
當我想要使用Eclipse生成serialVersionUID的時候,Eclipse彈出出錯信息.The following problem occurred.
could not find class file.
make sure the file is compilable.
同時項目中的Java文件出錯時會出現的紅叉叉也不再出現
對比兩個項目的屬性發現失敗的項目缺少一個名為"Java Builder"的Builder
一般在Eclipse新建項目都會有配置Java Builder
但這個項目是使用m2eclipse的
創建出來并沒有JavaBuilder
取而代之的是一個AspectJ Builder
解決辦法:
還沒有
抱歉這個問題還在困擾著我
嘗試過自行添加一個JavaBuilder
到workspace項目中打開.project文件添加下面代碼
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
卻引來更嚴重的ClassNotFoundException
posted on 2008-08-15 16:13 Gordian Yuan 閱讀(2067) 評論(2) 編輯 收藏