StreamBase Command Prompt

Introduction

The StreamBase Command Prompt is a feature of the Windows version of StreamBase.

Recent StreamBase releases provide a link in the Start menu for the StreamBase n.m Command Prompt, where n and m are the major and minor StreamBase release numbers. This link opens a Windows Command Prompt session with its environment pre-set for running StreamBase command-line utilities.

Environment Settings

The following table summarizes the Windows environment settings set in the StreamBase Command Prompt in recent releases of StreamBase.

Environment Variable Notes
STREAMBASE_HOME Absolute path to the top-level StreamBase installation directory.
PATH

Prepends %STREAMBASE_HOME%\jdk\bin, %STREAMBASE_HOME%\bin64, and %STREAMBASE_HOME%\bin to the PATH.

CLASSPATH Prepends %STREAMBASE_HOME%\lib\sbclient.jar to the CLASSPATH.
PYTHONPATH Appends %STREAMBASE_HOME%\lib\python2.7 to the PYTHONPATH.
JAVA_HOME If JAVA_HOME is not set, sets it to %STREAMBASE_HOME%\jdk.

Opening a StreamBase Command Prompt

Open a StreamBase Command Prompt with the following command sequence:

Start(All) ProgramsStreamBase n.mStreamBase n.m Command Prompt

You can also select the top level of a project folder in the Studio Package Explorer, right-click, and select Open StreamBase Command Prompt Here from the context menu. This opens a StreamBase Command Prompt whose current directory is the selected project's directory in the Studio workspace.

StreamBase 64-Bit Command Prompt

On StreamBase releases prior to 7.6.0, where 32-bit Windows was still supported, the StreamBase installer created two Start menu items: one to run the default StreamBase Command Prompt, which was set for the 32-bit case, and a second to the StreamBase 64-bit Command Prompt.

Starting with StreamBase 7.6.0, 32-bit Windows is no longer supported. Thus, the single Start menu item StreamBase Command Prompt is configured for default 64-bit operation.

Setting the Environment Globally

If you have only one version of StreamBase installed, you might prefer to have the StreamBase environment set globally, instead of set only in a StreamBase Command Prompt. In this configuration, you could use any Windows Command Prompt session to run StreamBase utilities, and would not be restricted to using the StreamBase Command Prompt. This configuration might be appropriate for a deployment system running a production StreamBase application.

Important

If you have more than one StreamBase installation on the same Windows machine, do not use sb-config to modify your global environment, or use it with caution, as discussed below in More Than One StreamBase Installation.

Use the sb-config utility to add StreamBase environment variables to your global environment, as described in the reference page sb-config. Use the --setenv option to modify the currently logged-in Windows user's environment. Use the --setsysenv option to modify the environment for all users.

More Than One StreamBase Installation

If you have more than one StreamBase installation on the same Windows machine, the use of sb-config and the StreamBase Command Prompt change accordingly.

Multiple Current StreamBase Installations

Follow these rules if you have, on the same Windows machine, two or more recent StreamBase installations, such as one 7.5 and one 7.6 installation:

  1. Use the StreamBase Command Prompt link in the Start menu of a particular installation to run StreamBase utilities from that installation. The following Start menu sequences open two separate StreamBase Command Prompts, each set with the environment from its StreamBase installation.

    • Start(All) ProgramsTIBCOStreamBase 7.5StreamBase 7.5 64-bit Command Prompt

    • Start(All) ProgramsTIBCOStreamBase 7.6StreamBase 7.6 Command Prompt

  2. If you prefer to have a primary StreamBase release installed, and you want to set the global Windows environment for that primary release, then use the sb-config utility with caution.

    Caution

    Be sure to run the correct sb-config utility when using the --setenv and --setsysenv options. You have one sb-config utility for each installation. Before running sb-config, open a StreamBase Command Prompt for the installation you want to become the primary system default, and verify that you have the intended release with the following command:

    sb-config --version
    

    If you use sb-config --setsysenv or --setenv to set the global environment for a primary StreamBase release, then thereafter, that release's utilities are available in any standard Windows command session. To use the StreamBase commands for a non-primary installation, you must explicitly open a StreamBase Command Prompt for the non-primary release.

Running As Administrator on Windows 7 and 8

For running most utilities and samples on Windows 7 and 8, you can use the normal StreamBase Command Prompt as installed in the Start menu. However, with User Account Control (UAC) enabled, certain StreamBase commands may fail silently or return an error message. These include commands that attempt to modify the global environment (sb-config --setenv and --setsysenv), or that attempt to write to the Windows registry (sbd --install-service and --remove-service).

To run such commands on Windows 7 or 8 with UAC enabled, you must run the StreamBase Command Prompt with administrator privileges. Follow these steps:

  1. Click the Windows orb in the lower left corner of the Taskbar.

  2. Click All Programs.

  3. Locate TIBCO in the list of programs and click to open the TIBCO menu.

  4. Open the StreamBase n.m folder, where n.m represents your release number.

  5. Right-click the StreamBase n.m Command Prompt entry and select Run as administrator from the context menu.

  6. Click Continue in the resulting User Account Control dialog.

A StreamBase Command Prompt opened with administrator privileges shows the word Administrator in the title bar, and opens by default in the Windows\system32 directory instead of the StreamBase installation directory.

To navigate to the StreamBase installation directory, use the following command:

cd %STREAMBASE_HOME%