Helloworld.java文件代码如下public class HelloWorld{public static void main(String[] args){System.out.println("HellowWorld");}}在cmd终端运行了以下命令javac Hellowold.javajava Helloworld后出现下列错误Exception in thread "main" java.lang.NoClassDefFoundError: Helloworld (wrong name: HelloWorld)at java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClass(Unknown Source)at java.security.SecureClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.access$100(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)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)at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)想知道代码中到底是哪里出现了问题
添加回答
举报
0/150
提交
取消