posted 12 years ago
The javac command expects a filename because the compiler needs to convert a file from one format to another.
The java command doesn't expect a filename; instead, it expects the fully qualified name of a class (a name that unambiguously identifies a class in a Java application); because the application launcher needs to call the main method in the class. For example, com.xyz.Test.main(args).