如何通过Eclipse获取类文件?
我在Eclipse中编写了一个应用程序,已成功编译并运行。之后,在相应的目录中我找到了*.java和*.class文件。然后我删除了 *.class 文件,现在我不知道如何恢复它。
Eclipse 写信给我“未编写类文件。项目可能不一致,如果是这样,请尝试刷新此项目并构建它”。
通过右键单击该项目,我得到一个下拉菜单,在其中找到“刷新”,但我无法找到如何“构建”该项目。
那么,如何重新生成class文件呢?
预先感谢您的帮助。
I wrote an application in the Eclipse, which was successfully compiled and run. After that, in a corresponding directory I found *.java and *.class files. Then I have deleted the *.class file and now I do not know how can I get it back.
Eclipse writes me "A class file was not written. The project may be inconsistent, if so try refreshing this project and building it".
By the right click on the project I got a drop down menu in which I found "Refresh" but I cannot find out how can I "build" the project.
So, how can I generate the class file again?
Thank you in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当我有一个内部类,并且主类及其内部类的总名称超过 128 个字符时,我会收到此错误消息。 OpenJDK 和 Sun JDK 6 上都会发生这种情况。我的解决方案是缩短内部类名称。
I get this error message when I have an inner class, and the total name of the main class and its inner classes exceeds 128 characters. This happens both on OpenJDK and Sun JDK 6. The solution for me was to shorten the inner class names.