Here is this simple code from my book it produces error message in netbeans and in compile version (.class) version running through Command prompt.
Error Message
The args parameter in a class's main method is supplied by command line arguments. You are not invoking the jar with any command line args, so the array has no zero element.
args
main