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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -