Contents
To effectively use and develop with StreamBase and LiveView, you must configure the shell environment for all users and any server processes that want to take advantage of StreamBase and LiveView services.
Note
Syntax shown on this page is for the Bash shell. Adjust these lines as required if you are using a different shell.
StreamBase installations on Windows provide the StreamBase Command Prompt in the Windows Start menu. This opens a command prompt with its PATH and environment ready for use with StreamBase and LiveView tools. There is no need to manually configure the system or user environment in Windows.
If you prefer to use a UNIX-like environment on Windows such as Cygwin, use the
Linux settings below as a guide for configuring your
Bash setup files. Remember that absolute paths in Cygwin take the form /cygdrive/c/TIBCO...
instead of C:\TIBCO
.
There is no default installation folder for StreamBase installations on macOS. If you
use the .archive-bin
installers, StreamBase installs by
default in /opt/tibco
, as on Linux. In this case, use
the Linux settings below as a guide to shell configuration settings on macOS.
If you used the DMG installer, you can drag the StreamBase folder to any location on
your Mac. TIBCO recommends dragging the DMG's StreamBase folder to ~/Applications
, which is a folder named Applications
at the root of your home directory, such as
/Users/sbuser/Applications
. The examples below presume
you are using TIBCO's recommended installation path.
Modify the environment of all users who will use and develop with StreamBase on this
Mac by adding the following commands to shell startup files such as .bash_profile
. Notice that the first command uses the back quote
character ( ` ), not the single quote character:
eval `~/Applications/TIBCO\ Streaming\ 10.4.0/bin/sb-config --env` export JAVA_HOME=`sb-config --java-home` export PATH=$JAVA_HOME/bin:$PATH
Notice that after the first line, the sb-config command is located in the PATH.
To make sure these commands are executed automatically for every Terminal window, add commands like the following to the shell initialization file for each user.
if [ -d ~/Applications/TIBCO\ Streaming\ 10.4.0/bin ] ; then eval `~/Applications/TIBCO\ Streaming\ 10.4.0/bin/sb-config --env` export JAVA_HOME=`sb-config --java-home` export PATH=$JAVA_HOME/bin:$PATH else echo "No StreamBase installation detected." fi
As an alternative on macOS, if you have an Oracle JDK installed on your Mac (whose version is the same as the one installed with StreamBase or newer), you can use the following lines to configure command-line Java:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8` export PATH=$JAVA_HOME/bin:$PATH
See Installing a JDK for further information on how StreamBase commands configure to use a JDK.
In addition to the usual macOS ways to open a Terminal, StreamBase Studio provides a shortcut. Select the top level of an EventFlow or LiveView project folder in Studio's Project Explorer, right-click, and from the context menu, select Open StreamBase Command Terminal Here. This opens a Terminal whose current directory is the selected project's directory in the Studio workspace.
See Shell Setting Reference to understand why each setting is made.
You might find it helpful to create a symbolic link in your ~/Applications
folder to avoid issues with the spaces in the
StreamBase folder name. For example:
cd ~/Applications ln -s TIBCO\ Streaming\ 10.4.0 streambase
With this symlink in place, you can use the following script in your shell initialization files instead of the one above:
if [ -d ~/Applications/streambase/bin ] ; then eval `~/Applications/streambase/bin/sb-config --env` export JAVA_HOME=`sb-config --java-home` export PATH=$JAVA_HOME/bin:$PATH else echo "No StreamBase environment detected." fi
This method has the advantage of not requiring changes to your shell startup files when you install new major and minor releases of StreamBase. You only have to change where the symbolic link points.
Modify the environment of all users who will use and develop with StreamBase by adding the following commands to their shell startup files. If you expect to install and run StreamBase Runtime nodes with a specific server-only username, be sure to modify the environment for that username as well.
Notice that the first command uses the back quote character ( ` ), not the single quote character:
eval `/opt/tibco/sb-cep/10.4/bin/sb-config --env` export JAVA_HOME=`sb-config --java-home` export PATH=$JAVA_HOME/bin:$PATH
Make sure these commands are executed automatically for every shell window opened by
adding commands like the following to shell startup files such as .bash_profile
for each user:
if [ -x /opt/tibco/sb-cep/10.4/bin/sb-config ]; then eval `/opt/tibco/sb-cep/10.4/bin/sb-config --env` export JAVA_HOME=`sb-config --java-home` export PATH=$JAVA_HOME/bin:$PATH else echo "No StreamBase installation detected." fi
The sbconfig --env command sets an LD_LIBRARY_PATH variable for you, but that variable is no longer needed or used on recent Linux distributions. If that variable has no other use on your system by other products, you can remove that setting with a line like the following:
unset LD_LIBRARY_PATH
See the next section's Shell Setting Reference to understand why each setting is made.
The shell environment on macOS and Linux requires the environment variable settings shown in this section. TIBCO recommends configuring your shell environment by using the sb-config --env and sb-config --java-home commands, as described in the Linux and macOS sections above.
The first set of variables are set by the sb-config --env command:
- STREAMBASE_HOME environment variable
-
Set this to the full, absolute path to the root of the StreamBase installation directory, such as:
/opt/tibco/sb-cep/10.4 /Users/
sbuser
/Applications/TIBCO Streaming 10.4.0 /Applications/TIBCO Streaming 10.4.0 C:/TIBCO/sb-cep/10.4 - Add three StreamBase folders to the PATH
-
The following folders must be on the shell's PATH in order to run StreamBase command-line utilities, the epadmin management and deployment tool, and the included mvn command:
$STREAMBASE_HOME/bin
SSTREAMBASE_HOME/distrib/tibco/bin $STREAMBASE_HOME/sdk/mvn/bin - Add StreamBase man pages to the MANPATH
-
Add the folder containing man pages for StreamBase command-line utilities to the MANPATH:
$STREAMBASE_HOME/man
- LD_LIBRARY_PATH environment variable
-
This variable is still set by sbconfig --env, but is no longer needed or used on recent Linux distributions. You can unset this variable.
The following settings must be made manually:
- TIBCO_EP_HOME environment variable
-
Starting with StreamBase release 10.3.0, this variable is no longer used or required. If your development machine is used to maintain projects from earlier StreamBase releases, set this to the same full path as STREAMBASE_HOME.
- JAVA_HOME
-
Starting with StreamBase 10.4.0, StreamBase Studio detects and uses a system-installed Oracle JDK 8 in preference over its bundled JDK 8. Strictly speaking, the JAVA_HOME variable is not required, but it can be used as a convenient way to set the path to the required JDK. See Installing a JDK for a discussion of JDK issues.
To develop client programs that will access StreamBase servers or LiveView servers,
you may need to specify additional environment settings. Use sb-config command options such as sb-config --cxx
or sb-config --classpath
to configure your development
environment. See the sb-config reference page for details.