I too struggled with this but am able to run from command line successfully after so much research on NoClassDefinition found error.
My question is - whenever a class has a package declared then is it necessary to add the package prefix to the class name for running that class? is it not possible to run the class without prefixing the package name? for javac it is working even without the package prefix.
1. javac does not check package structure but java command does. Hence your .class file should be present into folders resembling the package structure.
2. If you have not specified .; in your classpath environment variable then while running you have to specify java -cp .; to recognize current directory.
3. If you have no classpath environment variable set, then the current directory (.) will be taken as your default classpath.
If you search you will get good number of posts discussing this question.