Commandline Arguments Instructions for jGRASP


Step #1: Download a program that uses commandline arguments and open it with jGRASP

For example, Repeat.java program.

Step #2: Click "Build", then click "Run Arguments"

Click Build, then click Run Arguments

Step #3: You will see the "Run Arguments:" text box at the top of the jGRASP window

Run Arguments textbox

Step #4: Type in the runtime arguments, leaving a space between each word or number

Arguments in the textbox

Step #5: The runtime arguments are stored as an array of strings in the "args" parameter

args parameter

Step #6: Click the "Run" button and the Repeat.java program will display the runtime arguments stored in the "args" array

args output