Parsing Java command line arguments when jar file and main class are specified -
my java execution run follows:
java -cp jar mainclass arga argb argc what arga correspond to? args[1] or args[4] ? thank you.
if main method defined as:
public static void main(string[] args) { then arga in args[0].
see oracle's command-line arguments tutorial example program.
Comments
Post a Comment