尝试运行以前正确运行的应用程序时ClassNotFoundException

时间:2023-01-20 21:25:53

I have a java project 'eartquake' in Eclipse containing several packages. The project icon contains a red exclamation mark. I cannot find out what it means. When trying to run any package of this project I get the ClassNotFoundException error. When I run for example the AppQuake applet from package earthquake I get the error shown below. The .class file is in the build directory of the package. It has run before. Other applets from other projects still do run. What am I doing wrong?

我在Eclipse中有一个包含几个包的java项目'eartquake'。项目图标包含红色感叹号。我无法找出它的含义。当尝试运行此项目的任何包时,我得到ClassNotFoundException错误。当我从包地震中运行AppQuake小程序时,我得到如下所示的错误。 .class文件位于包的构建目录中。它已经运行过。其他项目中的其他applet仍在运行。我究竟做错了什么?

load: class earthquake.AppQuake.class not found.
java.lang.ClassNotFoundException: earthquake.AppQuake.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

1 个解决方案

#1


1  

The red exclamation mark means that the IDE is notifying that there are build errors in your project: see documentation

红色感叹号表示IDE正在通知项目中存在构建错误:请参阅文档

On * you can find someone who had the same issue here and a possible solution here in case you changed the project structure and left some dead dependencies.

在*上,您可以找到在此处遇到相同问题的人以及可能的解决方案,以防您更改项目结构并留下一些死的依赖项。

Your project is probably misconfigured, or missing some dependencies in the classpath.

您的项目可能配置错误,或者在类路径中缺少某些依赖项。

#1


1  

The red exclamation mark means that the IDE is notifying that there are build errors in your project: see documentation

红色感叹号表示IDE正在通知项目中存在构建错误:请参阅文档

On * you can find someone who had the same issue here and a possible solution here in case you changed the project structure and left some dead dependencies.

在*上,您可以找到在此处遇到相同问题的人以及可能的解决方案,以防您更改项目结构并留下一些死的依赖项。

Your project is probably misconfigured, or missing some dependencies in the classpath.

您的项目可能配置错误,或者在类路径中缺少某些依赖项。