SAP Java Buildpack 2 is a Cloud Foundry buildpack for running SapMachine-based applications.
This buildpack supports Java 17 and 21, as well as the following runtimes:
To use this buildpack, specify its name when deploying a Java (Jakarta) application to the SAP BTP, Cloud Foundry environment:
cf push -f <PATH_TO_APP_MANIFEST> -b sap_java_buildpack_jakarta
You can also use the buildpack attribute to specify it in the manifest.yml
file:
---
applications:
- name: <APP_NAME>
buildpacks:
- sap_java_buildpack_jakarta
...
or in the mtad.yml
file of your archive:
...
modules:
- name: <APP_NAME>
type: java.tomcat
path: <path_to_archive>
properties:
...
parameters:
...
memory: 512M
buildpack: sap_java_buildpack_jakarta
...
The SAP BTP, Cloud Foundry environment provides four versions of SAP Java Buildpack 2 as part of its system buildpacks:
-
sap_java_buildpack_jakarta – Holds the latest available version of SAP Java Buildpack 2. All new features and fixes are provided with this version.
-
sap_java_buildpack_jakarta_<version_latest> – Holds the latest available version of SAP Java Buildpack 2. It's available for a limited timeframe (4 to 6 weeks).
-
sap_java_buildpack_jakarta_<version_previous> – This version used to be latest in the previous update of the SAP BTP, Cloud Foundry environment. It's available for a limited timeframe (4 to 6 weeks).
-
sap_java_buildpack_jakarta_<version_before_previous> – This version used to be latest before two updates of the SAP BTP, Cloud Foundry environment. It's available for a limited timeframe (4 to 6 weeks).
To check these versions, proceed as follows:
-
Log in to a particular SAP BTP region and subaccount. For example, if your region is eu10, run:
cf api https://api.cf.eu10.hana.ondemand.com
-
Then run:
cf buildpacks
-
Option 1: Use the default one – sap_java_buildpack_jakarta
You take advantage of all latest features and fixes in SAP Java Buildpack 2. This way, it's guaranteed that the buildpack is always available. The drawback in this case is the limited time for adoption, if it's needed. In such a scenario, applications can fall back to an older version temporarily to avoid any downtime.
-
Option 2: Set a particular version – sap_java_buildpack_jakarta_<version_suffix>
Bear in mind that this version will only exist for a limited amount of time. This may lead to the situation where application restage is failing because the used version of the buildpack is no longer available. To avoid this, we recommend that you follow the updates of the buildpack and test your applications with its latest version. Developers should never allow their applications to run on an outdated buildpack version.
Example:
Let's say that the latest version of SAP Java Buildpack 2 is 2.24.0. Then, the output of the cf buildpacks
command would be:
buildpack position enabled locked filename
sap_java_buildpack_jakarta 1 true false sap_java_buildpack_jakarta-2.23.0.zip
sap_java_buildpack_jakarta_2_23 2 true false sap_java_buildpack_jakarta-2.23.0.zip
sap_java_buildpack_jakarta_2_22 3 true false sap_java_buildpack_jakarta-2.22.0.zip
sap_java_buildpack_jakarta_2_21 4 true false sap_java_buildpack_jakarta-2.21.0.zip
When SAP Java Buildpack 2 is updated on the SAP BTP, Cloud Foundry environment from version 2.23.0 to 2.24.0, the list will change to:
buildpack position enabled locked filename
sap_java_buildpack_jakarta 1 true false sap_java_buildpack_jakarta-2.24.0.zip
sap_java_buildpack_jakarta_2_24 2 true false sap_java_buildpack_jakarta-2.23.0.zip
sap_java_buildpack_jakarta_2_23 3 true false sap_java_buildpack_jakarta-2.22.0.zip
sap_java_buildpack_jakarta_2_22 4 true false sap_java_buildpack_jakarta-2.21.0.zip
This means that sap_java_buildpack_jakarta_2_21 will no longer be available for applications.
No fixes will be provided to older versions of the buildpack. Fixes, including security ones, will be part of the latest version.
To use sap_java_buildpack_jakarta_<version_suffix>, specify its name when pushing an application to the SAP BTP, Cloud Foundry environment:
cf push -f <PATH_TO_APP_MANIFEST> -b sap_java_buildpack_jakarta_<version_suffix>
Alternatively, you can specify the buildpack in the manifest.yml
file.
For example:
---
applications:
- name: myapp
memory: 128M
path: ./target/myapp.war
instances: 1
buildpacks:
- sap_java_buildpack_jakarta_2_18
You can do the same in the mtad.yml
of your mtar archive:
...
modules:
- name: myapp
type: java.tomcat
path: ./target/myapp.war
properties:
...
parameters:
...
memory: 512M
buildpack: sap_java_buildpack_jakarta_2_18
...
SAP Java Buildpack 2 (sap_java_buildpack_jakarta
) supports the following Java versions:
- Java 17 – default version. You can obtain it by using SapMachine 17 (it provides a JRE with Java 17)
- Java 21 – you can obtain it by using SapMachine 21 (it provides a JRE with Java 21)
To learn how to configure your application to use SapMachine JRE and JDK, see: SapMachine
SAP Java Buildpack 2 provides the following components in the application container (<APP_ROOT_DIR>/app/META-INF/.sap_java_buildpack_jakarta
):
-
SAP BTP Security Services Integration Libraries – version 3.x
To check all the components regularly updated in the SAP Java Buildpack 2.x releases, see: SAP Java Buildpack BOM
To see the latest news and updates about SAP Java Buildpack 2, regularly check the release notes on the What's New portal.
If you encounter an issue while using SAP Java Buildpack 2, you can:
-
Search for your problem in our Troubleshooting section.
-
Create an incident for your specific problem, using support component BC-CP-CF-BLDP. To provide the necessary details, use the following template: Initial Problem-Related Data