Select a Java Methods and Static Methods step in a sequence and click the Edit Call or Edit Static Call button on the Step Settings pane to launch the Edit Java Call dialog box, in which you can configure the step to call the appropriate Java method.

The Edit Java Call dialog box contains the following options:

  • Java Class to Load—The Java class that contains the method to call. If TestStand cannot locate the file, TestStand launches the File Class Not Found dialog box. Select the Add the directory containing the file you selected to the list of search directories option and click OK. Do not select Use an absolute path for the file you selected. The control below the Java Class to Load control displays the complete file path of the specified class. If the file is incorrect, add the appropriate directory to the list of TestStand search directory paths or move the directory up to a higher position in the list of search paths.
    Note Always use a relative path for the Java class to load. If you specify an absolute path, the Java virtual machine (JVM) cannot locate the class name and you receive a -1000 Class Not Found error.
  • Java Method—The name of the method to call. Specify the name after you select the Java class that contains the method.
  • Parameters—Contains the following options for creating and configuring parameters to pass to the specified method:
    • Method Parameter—The list of parameters to pass to the specified method. Select a parameter from the ring control to specify the argument type and value expression for the parameter. The order of parameters must match the order the Java method header uses in the parameter list. If no parameters are to be passed, delete all parameters from the list.
    • New—Adds a new parameter to the list of parameters.
    • Argument Type—The type of the parameter. The available types are the Java types represented in the Java method header.
    • Delete—Deletes the selected parameter from the list of parameters.
    • Value Expression—The value expression for the parameter. If the value to be passed is stored in a TestStand variable, click Browse to locate the variable. Otherwise, enter the value of the parameter. You must verify that the type of the value or TestStand variable is compatible with the Java parameter type.
      Note Enclose literal strings and characters in double quotes.
  • Return Value—Contains the following options for specifying a return value for the specified method:
    • Return Value—The return value.
    • Argument Type—The type of the return value. The type must match the variable that stores the return value, or the return value must be compatible for the appropriate comparisons to occur. For example, the Numeric Limit Test steps require the return value to be stored in Step.Result.Numeric, the String Value Test steps require the return value to be stored in Step.Result.String, and the Pass Fail Test steps require the return value to be stored in Step.Result.PassFail. For Action steps, select void for the argument type if no return value exists.
    • Value Expression—The value expression for the return value, which TestStand stores in a variable. Click Browse to locate the variable. You must verify that the type of the value or TestStand variable is compatible with Java types.