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. On 64-bit StreamBase installations, the installer also provides a link named StreamBase n.m 64-bit Command Prompt.

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 For 32-bit StreamBase Command Prompts, prepends %STREAMBASE_HOME%\jdk\bin and %STREAMBASE_HOME%\bin to the PATH.

For 64-bit StreamBase Command Prompts, prepends %STREAMBASE_HOME%\jdk64\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.6 to the PYTHONPATH.
JAVA_HOME If JAVA_HOME is not set, sets it to %STREAMBASE_HOME%\jdk or %STREAMBASE_HOME%\jdk64, as appropriate for the StreamBase Command Prompt version.

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 supported 64-bit Windows platforms, you can install the StreamBase kit for 64-bit Windows, as described in 64-Bit Windows Considerations. In this case, the Start menu for your StreamBase release contains an entry for the StreamBase 64-bit Command Prompt, in addition to the regular StreamBase Command Prompt.

The StreamBase 64-bit Command Prompt is a Windows command prompt with %STREAMBASE_HOME%\bin64 on the PATH in addition to %STREAMBASE_HOME%\bin. When you run StreamBase Server from the StreamBase 64-bit Command Prompt, you invoke the 64-bit version of the server.

On 64-bit Windows, if you are configuring your Windows environment with the sb-config command, or you are installing a Windows service with sbd --install-service, then be sure to use the appropriate version of the StreamBase Command Prompt. The 64-bit Command Prompt installs the 64-bit server and configures for the 64-bit environment. The standard StreamBase Command Prompt installs and configures for the 32-bit environment.

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.5 64-bit 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 and 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 64-bit Command Prompt entry and select Run as administrator from the context menu. (Or right-click the StreamBase n.m Command Prompt item to start a 32-bit StreamBase Command Prompt.)

  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%