使用命令符窗口编译Java
C:\Users\Administrator\Desktop>java OperatorException in thread "main" java.lang.NoClassDefFoundError: Operator (wrong name:
book/basic/Operator)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
at (URLClassLoader.java:283)
at (URLClassLoader.java:58)
at (URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at (URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: Operator. Program will exit.
为什么老是会出现这样的错误,我编写的Java没有错误,而且有时候编译没有错误,有的时候就有,为什么,求指导!!