CommandPrompter class

The IBM® Toolbox for Java™ CommandPrompter class prompts for the parameter on a given command.

The CommandPrompter class offers functionality that is similar to the CL command prompt (pressing F4) and the same as the Management Central command prompt.

Using CommandPrompter requires that you have the following JAR files in your CLASSPATH:

You must also have an XML parser in your CLASSPATH. For more information about using a suitable XML parser, see the following page:

XML parser and XSLT processor

All of the JAR files, except for jhall.jar, are included in IBM Toolbox for Java. For more information about IBM Toolbox for Java JAR files, see Jar files. For more information about downloading jhall.jar, see the Sun JavaHelp Web site Link outside Information Center.

To construct a CommandPrompter object, you pass it parameters for the parent frame that launches the prompter, the AS400 object on which the command will be prompted, and the command string. The command string can be a command name, a full command string, or a partial command name, such as crt*.

The CommandPrompter display is a modal dialog that the user must close before returning to the parent frame. The CommandPrompter handles any errors encountered during prompting. For a programming example that shows one way to use the CommandPrompter, see the following page:

Example: Using CommandPrompter