What is a java batch file? Do you mean the java source file?

Since it compiles and runs in Netbeans, the problem is probably with your file structure, the directory you're in when issuing the...