This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Command line flags are not part of the main method arguments. You could see that by looping through the args parameter.
If you type "java" at the prompt, you'll some help, looking like that : Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file)
This [-options] like -D are not part of the command line arguments. The [args...] are.
A java [-Dx=y] x [y z] : property x = y. args = z B java [-Px=y] x [y z] : -P ?? C java [-Dx=y] x [x y z] : property x = y. args = y D java [-Px=y] x x y z : -P ?? E java x [x y z -Dx=y] : property x does not exist. args = y F java x [x y z -Px=y] : property x does not exist. args = y