sb-config

StreamBase Compiler Environment Utility — a tool to set StreamBase working environment and to set client API development flags

SYNOPSIS

sb-config [OPTION]

DESCRIPTION

sb-config is a convenience utility primarily used with its --env option to set the shell environment for using StreamBase and LiveView. See "StreamBase-Configured Shells" in the StreamBase Installation Guide for information on using this option in shell startup files.

The tool is also used to return development values that can be used in environment variables or build-related scripts to configure the command-line environment for use with one of the StreamBase or LiveView Client APIs. In particular, use sb-config to:

-- Return the full paths to the Java commands that this StreamBase and LiveView installation is currently configured to use with the Java Client API.
-- Return the path to the JAR files that implement the StreamBase and LiveView Java Client APIs.

The --env option might emit shell lines or fragments that contain double quotes such that any spaces in the emitted line do not break up a variable definition or a command line option. On Linux and macOS, this behavior interacts as expected with the shell eval command and with back quote operators.

This command's other options do not put quotes around emitted paths that contain spaces, because the output of these options is likely to be combined with other members of a PATH, CLASSPATH, or other PATH-like variable. If your StreamBase installation path contains spaces, you might need to make sure your build script or Makefile uses double quotes around the expansion of the sb-config output that you capture in a variable.

OPTIONS

--classpath  (Linux, macOS, and Windows)

Returns the path to the StreamBase client library JAR file that must be added to the classpath when building and running StreamBase Java client applications. See the --live-data-client-classpath option below for LiveView client development.

--env  (Linux, macOS, and Windows)

Returns, but does not execute, the commands to set environment variables for running StreamBase utilities at the command prompt. With macOS and Linux shells, use the output of sb-config --env with eval or a similar command to run the commands returned. For all platforms, returns a setting for STREAMBASE_HOME and prepends the StreamBase bin directories to the PATH. For macOS and Linux, also returns a setting for MANPATH. See the StreamBase-Configured Shells page in the StreamBase Installation Guide for information on using this option in shell startup files.

--help, -h  (Linux, macOS, and Windows)

Displays a usage message, then exits. Using the sb-config command with no arguments also shows usage.

--java-home  (Linux, macOS, and Windows)

Returns the full absolute path to the directory that contains a system-installed JDK, or StreamBase-bundled JDK, to be used with StreamBase Studio and StreamBase command-line utilities. Whether this option returns the path to a system or bundled JDK depends on the setting, if any, of the STREAMBASE_USE_INTERNAL_JDK environment variable, as follows:

  • fallback — If set to fallback, or not set, this configures Studio to try to locate a system-installed JDK, and to use the Streaming bundled JDK only if an acceptable system JDK is not found.

  • true — Always use the JDK bundled with Streaming. This was the default value of STREAMBASE_USE_INTERNAL_JDK before release 10.4.0.

  • false — Use the JDK specified in the JAVA_HOME environment variable, if set. JAVA_HOME must be set to the full, absolute path to the top-level directory containing your JDK.

    If set to false, but no JAVA_HOME is defined, Streaming searches the system PATH for a JDK. If not found, Streaming looks in standard installation locations for a JDK. If still not found, Studio does not start.

--java  (Linux, macOS, and Windows)

Returns the path to the java command used by the current StreamBase and LiveView installation, using the same rules as for --java-home, above. By default, this option returns the java command from a system-installed JDK.

--javac  (Linux, macOS, and Windows)

Returns the path to the javac Java compiler used by the current StreamBase and LiveView installation, using the same rules as for --java-home, above.

--live-data-client-classpath  (Linux, macOS, and Windows)

Returns the path to the LiveView client API JAR files plus the StreamBase client library JAR file that must be added to the class path when building and running LiveView Java client applications. See the --classpath option above for StreamBase-only development.

--version

Returns version information and exits.

EXAMPLES

The next lines show how to compile and run a StreamBase Java client application.

javac -classpath `sb-config --classpath` MyApplication.java

java -classpath `sb-config --classpath`:. MyApplication