JCShell commands

The table below provides an overview of the basic JCShell commands. These commands are always available when the JCShell is active.

Additional commands are available depending on the active Shell plugins.

Command Description
help / ? Displays available commands (if is used without parameters) or syntax information for a particular command.
quit Exit the JCShell
version Display the current JCShell program version and it's build timestamp.
> Redirect shell output.
/applet Switch to a specified applet plugin.
/atr Resets the card (requests an answer to reset)
/cap-clear Remove DAP and Delegated Management information from a CAP-file.
/cap-info Displays information about a particular CAP-file.
/cap-inst-auth Authorize a package in a CAP-file for delegated installation of an applet of this package. The resulting Install Token information is stored in the CAP-file.
/cap-load-auth Authorize a package in a CAP-file for delegated loading. The resulting Load Token information is stored in the CAP-file.
/cap-sign Sign a package in a CAP-file. The resulting DAP information is stored together with the CAP-file data in a LOAD-file.
/card Resets the inserted card, gets the ATR and selects the CardManager (default=GlobalPlatform CardManager) via the default logical channel (zero).
/channel List applets (JCShellPlugins) and their channels
/clear-vars Clear variable pool
/close Closes the connection to the terminal (also card disconnection).
/dialog Display message dialog and wait for OK.
/echo Output arguments on current output
/error Abort execution of a function or SCRIPT and set arguments as error string
/exec Execute/kill/wait a subprocess.
/expr Arguments are evaluated as expression and the result is set as return value.
/glob Collect all file name matching given patterns as return value.
/identify Show card information data (only if card is connected).
/list-vars Displays matching/all JCShell internal variables, e.g. keys.
/manage-channel ISO 7816-4/Global Platform MANAGE CHANNEL command.
Either opens the next available supplementary logical channel or closes the current logical channel.
/mode Set the JCShell mode of operation, e.g., whether full APDU command tracing shall be enabled or not.
/printf Format args according to format specification (like C printf).
/register List applets or Introduce an applet to the shell.
/robot Include java.awt.Robot class functionality.
This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.
/r-echo Echo arguments to be output (remotely).
/select Selects the applet with the given AID on the card either on the current logical channel or optionally on another, possibly new, logical channel.
/send Send an APDU unconditional, bypassing the plugin(s), using negotiated protocol/channel or raw.
/set-channel Sets the logical channel number used in any subsequent APDU communication.
/set-var Sets the named JCShell internal variable.
/sleep Delay execution for given amount of time.
/terminal Connects to a given terminal (smart card reader) or card simulation. Obtains status information if already connected.

If requested by IBM support, set the environment variable PRINT.STACKTRACE for additional error information.