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
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.
The following table summarizes the Windows environment settings set in the StreamBase Command Prompt in recent releases of StreamBase.
|STREAMBASE_HOME||Absolute path to the top-level StreamBase installation directory.|
|JAVA_HOME||If JAVA_HOME is not set, sets it to
Open a StreamBase Command Prompt with the following command sequence:
→ → →
You can also select the top level of a project folder in the Studio Package Explorer, right-click, and select one of the following from the context menu. This opens a StreamBase Command Prompt whose current directory is the selected project's directory in the Studio workspace.
Select Open StreamBase Command Prompt Here (Windows).
Select Open StreamBase Command Terminal Here (Mac).
Select Open StreamBase Command Shell Here (Linux).
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.
32-bit Windows is no longer supported. Thus, the single Start menu item StreamBase Command Prompt is configured for default 64-bit operation.
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.
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.
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.
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:
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.
→ → → →
→ → → →
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.
Be sure to run the correct sb-config utility when using the
--setsysenvoptions. 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:
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.
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:
Click the Windows orb in the lower left corner of the Taskbar.
Click All Programs.
Locatein the list of programs and click to open the menu.
Open the StreamBase n.m folder, where n.m represents your release number.
Right-click the StreamBase
n.mCommand Prompt entry and select Run as administrator from the context menu.
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: