Eclipse不编译项目 [英] eclipse doesn't compile the project
问题描述
我已经跑项目,打开了日食。窗户的意外重启后,现在当我打开Eclipse我看到我的项目上标有一点点红叉。现在,当我经营的主要方法,我收到了 java.lang.NoClassDefFoundError的
。
I had running project opened in eclipse. After an accidental restart of windows, now when I open the eclipse I see my project is marked with a little red cross. Now when I run the main method I get a java.lang.NoClassDefFoundError
.
我曾尝试重新启动日食,项目 - >干净的,但它并没有解决问题。
I have tried restarting eclipse, Project -> Clean but it doesn't solve the problem.
当我检查项目目录,里面的目标文件夹中有没有编译后的.class文件。我试图建设项目,但我不能让编译的类文件,这是错误的原因。
When I checked the project directory, inside 'target' folder there are no compiled .class files. I tried building the project but I can't get the compiled class files, which is the reason for the error.
我该如何解决这个问题?
How do I solve this?
推荐答案
也许Eclipse的工作区文件已损坏。重新启动Eclipse,然后选择一个新的工作区文件夹(或从菜单中选择切换工作区)。那么该项目文件导入到一个新项目。
Maybe Eclipse's workspace files have become corrupted. Restart Eclipse and choose a new workspace folder (or choose Switch workspace from the menu). Then import the project files into a new project.
这篇关于Eclipse不编译项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!