Run a java program from command line
Hello, I am extremely annoyed with my inability to run a java program from command line. I have tried using ant with no success. What is the easiest way to run a java program from command line? Here is what i have tried:
javac -cp . *java (within the directory of all of my .java files, seems to work)
javac -cp . NameOfClassWithMainMethod
then I get this error: Exeption in thread "main" java.lang.NoClassDefFoundError: Wrong name: dir/NameOfClassWithMainMethod
Followed by 10 lines of defineClass and LoadClass errors.
What am I doing wrong here. Is it me or does windows suck at running java from command line.

