The StreamBase installation on all platforms includes the runtime components of an Oracle JDK for private use by StreamBase Studio and StreamBase Server. See Supported Configurations for the current version of the JDK shipped with StreamBase.
If you prefer to use a separately installed Oracle JDK to run StreamBase applications, you must configure your system and StreamBase as follows:
-
Consult the Supported Configurations page to determine the current minimum JDK release levels supported by the current release of StreamBase. Do not try to use an earlier JDK release.
-
Download and install the JDK on each system that will run StreamBase Studio and StreamBase Server.
-
Configure both StreamBase Studio and StreamBase Server to use your JDK with these steps:
-
Define the
JAVA_HOME
environment variable, and set it to the full, absolute path to the top-level directory containing your JDK. -
Define the
STREAMBASE_USE_INTERNAL_JDK
environment variable, and set its value tofalse
. The value must befalse
in lowercase, as shown. -
To ensure that StreamBase Studio will launch, inspect your system PATH variable to identify JDKs other than what JAVA_HOME specifies, and delete any found from the path.
-
-
For StreamBase Server (but not Studio), as an alternative to using environment variables, you can edit the server configuration file for each instance of the server you will run. Edit the parameter
<param name="java-home">
in the<java-
vm> element to point to the full, absolute path of your external JDK. For example:<java-vm> <param name="java-home" value="C:\Program Files\Java\jdk1.8.0_60" /> </java-vm>
<java-vm> <param name="java-home" value="/usr/java/latest" /> </java-vm>
StreamBase Studio ignores the configuration file
<java-home>
setting, both for running Studio itself and for running StreamBase Server from within Studio. Thus, this setting only has an affect when running StreamBase Server at the command prompt with the sbd command.
To use JDK 8's G1 garbage collector, add the following parameters to the <jvm-args>
element of your project's server configuration file:
-
-XX:+UseG1GC
-
-XX:MaxGCPauseMillis=500
Remember that when adding parameters to the <jvm-args>
element in an sbconf file, you must repeat the default settings or lose them. See the Important note in Default Memory Settings on the Java VM Memory Settings page.
When using the G1 garbage collector, do not use any of the following parameters, which define the configuration for the non-G1 garbage collector:
-
-XX:+UseParNewGC
-
-XX:+UseConcMarkSweepGC
-
-XX:ParallelCMSThreads=1
-
-XX:+CMSParallelRemarkEnabled
-
-XX:+CMSPermGenPrecleaningEnabled
-
-XX:CMSInitiatingOccupancyFraction=30