Installing a JDK

JDK Requirements

StreamBase Studio and the Streaming Runtime require an installation of Oracle JDK 11 in order to compile and run StreamBase and LiveView program fragments and applications from within StreamBase Studio. A JRE is not sufficient to run StreamBase and LiveView applications; you must have a JDK.

On all supported operating systems, the StreamBase installation kit provides the runtime components of the Oracle JDK 11 version listed in Supported Configurations. This bundled JDK is placed in the jdk subdirectory of the Streaming installation directory. When looking for installed JDKs, Studio only searches for a JDK 11 at the same release level as the one bundled with Streaming, or later.

JDK 11 is the only Java release compatible with Streaming.

On Windows, by default, the StreamBase Command Prompt looks in standard installation locations for JDK 11, and uses the latest Java 11 version detected. That is, by default, the sb-config --java-home command used by the StreamBase Command Prompt does not rely on the JAVA_HOME environment variable, and ignores it if set. The JDK bundled with Streaming is used only if no appropriate JDK 11 is detected.

For macOS and Linux, TIBCO recommends using sb-config --java-home in your shell startup scripts, as described below in Using the Streaming-Determined JDK and in StreamBase-Configured Shells.

Starting with Streaming 10.3.0, StreamBase command-line tools such as epadmin and sbc do not use Java and do not require Java to be in the system PATH. (The jsbc and jsbadmin commands, however, do use Java.)

The bundled Maven command, mvn, does require Java; it uses the java command that the StreamBase Command Prompt or StreamBase-configured shell places first in the PATH. (Maven might also use a different Java version if so configured in POM files.)

Streaming is not supported with gcj or icedtea. However, StreamBase and LiveView fragments configured to run in Docker containers use OpenJDK 11 inside the container.

Installing a System JDK

Installing a system-level JDK has the advantages of being maintainable independently of StreamBase, and of providing access to JDK cryptography features not shipped by TIBCO. See the JDK Cryptography Features row of the Supported Platforms page for further details.

Download and install a recent JDK from Oracle. Select a JDK 11 release, and not just a JRE. The recommended version is a JDK from the same release as the JDK bundled with Streaming, or newer. Studio rejects JDK 11 releases earlier than the bundled version, and falls back to the bundled version if detected.

On all platforms, make sure the installer configures your command shell environment to add $JAVA_HOME/bin (or %JAVA_HOME%\bin) to your system PATH. If your JDK installer does not make this change, be sure to configure it manually in the system environment for Windows, or in the shell login scripts for users on macOS and Linux.

Note

Newer Java installers no longer set the JAVA_HOME environment by default. If your shell environment has a legacy setting for JAVA_HOME, make sure it points to the newly installed JDK.

On Windows, download and install the 64-bit JDK option, because Streaming is supported only on 64-bit editions of Windows.

On macOS, install a JDK from Oracle.

On Red Hat Linux, CentOS, Oracle, and Amazon Linux, the base installation might have installed a recent OpenJDK release. TIBCO recommends installing a supported Oracle JDK for development, QA, and deployment work with Streaming applications.

Using the Streaming-Determined JDK

On Windows platforms, the StreamBase Command Prompt looks in standard locations for an Oracle JDK 11 installation. If found, the Command Prompt adds its bin directory to the PATH. If not found, the JDK 11 bundled with Streaming is added to the PATH.

On macOS and Linux, you can emulate the Windows behavior by placing commands in your shell startup script like these examples:

  • Set JAVA_HOME to the output of sb-config --java-home.

  • Then add $JAVA_HOME/bin to the PATH.

Changing Default Behavior

You can change the default behavior described above by means of the STREAMBASE_USE_INTERNAL_JDK environment variable, which can be set to one of three values:

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

  • true — Always use the JDK 11 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.

Troubleshooting JDK Selection

To help determine which JDK StreamBase Studio uses, you can temporarily start Studio from a StreamBase Command Prompt on Windows, or from a StreamBase-configured shell prompt on macOS, with commands like the following.

On macOS, run:

STREAMBASE_JAVA_LAUNCHER_VERBOSE=1 sbstudio &

On Windows, the sbstudio command suppresses stderr output by default, so we use jsbc instead. Both jsbc and sbstudio commands use the same method to determine the Java command to use.

set STREAMBASE_JAVA_LAUNCHER_VERBOSE=1
jsbc