|
Java Tutorial |
CommandLineArgumentsThese pages make up the course notes for my Java programming course (run at Dallam, Milnthorpe, Cumbria). Hopefully they also make a useful self-learning tutorial. If you have ever run a command from the command line (DOS prompt, shell prompt, etc.) you have most probably used command line arguments, e.g. something like
or
In the windows example dir is the command (a program) and \windows is the "argument" to the command. In other words a command line argument is a piece of information passed to a program when it is executed. See CommandLineJava for more information about running Java from the command line. This work is Copyright Chris Hunter 2007, you may use it for non-commercial purposes |