Specifications

Sun Services
Java™ Programming Language
Module 9, slide 4 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Command-Line Arguments
Any Java technology application can use
command-line arguments.
These string arguments are placed on the command
line to launch the Java interpreter, after the class name:
java TestArgs arg1 arg2 "another arg"
Each command-line argument is placed in the args
array that is passed to the static main method:
public static void main(String[] args)