试图运行一个基本的“hello World”程序。我已按照分步教程进行操作,每次都会收到相同的错误消息:
java.lang.NoClassDefFoundError: HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
这是程序:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
有没有人遇到过同样的问题并知道如何解决?