The java command is working fine, it's just a matter of debugging.
Have you created your class file as a package? That is, at the top of the file, did you say "package <some name>"?
Also, did you include a "main" method in your file? That is, is there a method that says:
Code:
static public void main(String[] args) {
.
.
.
}
Something to that effect?