buildpackpcf

How to choose particular version of JRE from buildpack


Am new to PCF and using Java buildpack version 4.48.2 in my app which offers multiple OpenJDK JRE version like 11 and 17.

How can I enable Java17 when deploying my app? Am getting UnsupportedClassVersionError - appears its picking up the default version.


Solution

  • You need to set the environment variable as given below to enable Java17

    cf set-env app_name JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 17.+ } }'