Running your programs

 

In this section, you will learn more about running StreamIt programs in the workbench.

 

  1. In the Package Explorer view, find Minimal.str and double-click it to open it in an editor.
  2. Using the drop-down Run button in the toolbar, select StreamIt Application from the cascading Run As menu. This will launch the class in the active editor, or the selected class in the Navigator, as a local StreamIt application.

 

 

  1. When the program runs correctly, print statements in the source code will appear in the Console view.

 

 

  1. In the Console view, notice that the program executed ten print statements.  Running a program as a StreamIt Application uses the default settings for launching the selected file (ten iterations) and does not allow you to specify any arguments.
  2. To specify arguments, use the drop-down Run menu in the toolbar and select Run….

 

Run menu of the toolbar

 

  1. This time, the Launch Configurations dialog opens with the Minimal launch configuration selected.  A launch configuration allows you to configure how a program is launched, including its arguments, classpath, and other options.  (A default launch configuration was created for you when you chose Run as > Java Application or StreamIt > Compile Changes).

 

 

  1. Select the Arguments tab and change in the Program arguments area “-i 10” to “-i 1”.

 

 

  1. Click Run.  This time the program executes one print statement.

 

 

  1. Switch to the Debug perspective.  In the Debug view, notice that a process for the program launch was registered each time the program was run.

 

 

Note: You can relaunch any of these processes by selecting Relaunch from its context menu.

  1. Select the drop-down menu from the Run button in the workbench toolbar. This list contains the previously launched programs. These programs can be relaunched by selecting them in the history list.

 

     

 

Related concepts

Program launch support

General debugging support and Eclipse integration

 

Related tasks

Launching a StreamIt program

Creating a StreamIt application launch configuration

Setting execution arguments