我用清单和所有东西制作了一个可执行的 jar 文件,当我前一段时间在命令提示符下运行它时,它运行良好,但是现在,我做同样的事情,我也重新创建了几次 jar,它一直给我这个错误:
Exception in thread "main" java.lang.NoClassDefFoundError: ComputingAverage (wro
ng name: me/kevinossia/mystuff/ComputingAverage)
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)
我正在使用java -jar ComputingAverage.jar
命令。为什么我会收到此错误?