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
You are not passing command line arguments. args[0] is expecting a command line argument.
args[0]
IF you are running it from command line try this:
java Intocm 12.0
In eclipse
Run---> Run Configuration---> Arguments Tab---> give program arguments--> apply---> run