Entering Command-line Arguments

   

Thanks for using this pre-release version of Visual J++.

You have finished writing the code for your application and have finally gotten it to compile without any warnings or errors. But, before it can run, your application needs information passed to it from the command line. You can choose to enter this information from a console window or from within the development environment. The following procedure explains how to use the Custom options in the environmentÆs Launch tab of the projectÆs Properties dialog box. The Properties dialog box for an open project can be accessed from the Project menu.

To enter command-line arguments

  1. From Project Explorer, double-click a .java file to load it into the Text editor.

  2. On the Project menu, click <Project name> properties to display the Properties dialog box.

  3. On the Launch tab, click the Custom radio button.

    The Custom options on this tab provide a place to enter the command line arguments for your application.

  4. In the Arguments text box type the information you want to pass to your program.

    For example, if your program accepted a date in the format of MM DD YY, July 10, 1997 would be entered as 7 10 1997.

Note   The Arguments text box may have some viewer options displayed. If you have a specific reason to change these preset options, do so now and enter the date after them.

Now you are ready to debug your application. Setting a breakpoint before starting the integrated debugger is one way to start this process.