Hi All,
i am tring to run a
java program from commandline .
i included all classpaths while compiling the java file.
i included all environment variables.
i compiled it and i got the generated class file.
but still i cannot run the program.
This is the command and the error which i am getting:
E:\ECost>java MyProgram
Exception in
thread "main" java.lang.NoClassDefFoundError: MyProgram (wrong name
: ECost/MyProgram)
at java.lang.ClassLoader.defineClass0(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.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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
Please help me.
Thanks in Advance