Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.81 KB

File metadata and controls

43 lines (30 loc) · 1.81 KB

OpenJ9

The OpenJ9 is an alternative Java virtual machine from the Eclipse Foundation. The OpenJ9 JVM must be explicitly enabled to be used by the Liberty buildpack. To enable OpenJ9 set the JVM environment variable to the openj9 value. For example, add the following to your manifest.yml file:

---
env:
  JVM: openj9

Unless otherwise configured, the version of OpenJ9 that will be used is specified in the config/openj9.yml file. Versions of Java from the 8 and 11 lines are currently available.

The Liberty buildpack uses the IBM SDK by default.

Configuration

OpenJ9 can be configured by modifying the config/openj9.yml file in the buildpack fork or by passing an environment variable that overrides configuration in the yml file.

Name Description
version The version of OpenJ9 to use. Candidate versions can be found on the AdpotOpenJDK page.
type jre (default) or jdk.
heap_size normal (default) or large.
heap_size_ratio The ratio that is used to calculate the maximum heap size. The default heap size ratio is 0.75 (75% of the total available memory).

Common Configuration Overrides

The OpenJ9 configuration can be overridden with the JBP_CONFIG_OPENJ9 environment variable. The value of the variable should be valid inline YAML. For example:

  1. Use OpenJ9 version 8:

    $ cf set-env myApplication JBP_CONFIG_OPENJ9 'version: 8.+'
  2. Use full JDK instead of JRE:

    $ cf set-env myApplication JBP_CONFIG_OPENJ9 'type: jdk'