## 4.1.3.5.1.1.1  SAP Java Buildpack 1
SAP Java Buildpack 1 is a Cloud Foundry buildpack for running JVM-based applications.
This buildpack supports Java 8, 11, and 17, as well as the following runtimes:
- TomEE 7 [page 279]
- Tomcat 9 [page 286]
- Java Main [page 293]
##  Caution
Bear in mind that SAP Java Buildpack 1 has been deprecated and is going to be removed from SAP BTP, Cloud Foundry environment on December 31, 2025 !
For more information, see:
- Release Notes - April 3, 2025
- Release Notes - October 1, 2025
- Release Notes - December 31, 2025
## Usage
To use this buildpack, specify its name when deploying a Java application to the SAP BTP, Cloud Foundry environment. You can do it the following ways:
- Specify it directly in the cf push command:
- Specify it in the manifest.yml file of your application by using the buildpacks attribute:
```
cf push -f <PATH_TO_APP_MANIFEST> -b sap_java_buildpack
```
```
---applications: - name: <APP_NAME> memory: 512M buildpacks: - sap_java_buildpack ... env: TARGET_RUNTIME: tomcat
```
Then, you can deploy the application like this:
```
cf push <app_name>
```
- Specify it in the mtad.yaml deployment descriptor file (for multi-target applications) by using the buildpack attribute:
```
... modules: - name: <APP_NAME> type: java.tomcat path: <path_to_archive> properties: ... parameters: ... memory: 512M buildpack: sap_java_buildpack ...
```
Then, you can deploy the application like this:
```
cf push <app_name>
```
## Buildpack Versions
The SAP BTP, Cloud Foundry environment provides four versions of SAP Java Buildpack 1 as part of its system buildpacks:
- sap\_java\_buildpack - Holds the latest available version of SAP Java Buildpack 1. All new features and fixes are provided with this version.
- sap\_java\_buildpack\_&lt;version\_latest&gt; - Holds the latest available version of SAP Java Buildpack 1. It's available for a limited timeframe (4 to 6 weeks).
- sap\_java\_buildpack\_&lt;version\_previous&gt; - 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\_&lt;version\_before\_previous&gt; - 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:
1. Log in to a particular SAP BTP region and subaccount. For example, if your region is eu10 , run:
2. Then run:
```
cf api https://api.cf.eu10.hana.ondemand.com
```
```
cf buildpacks
```
## How to use versions of SAP Java Buildpack 1?
- Option 1: Use the default one -sap\_java\_buildpack
You take advantage of all latest features and fixes in SAP Java Buildpack 1. 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\_&lt;version\_suffix&gt; 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 1 is 1.114.0 . Then, the output of the cf buildpacks command would be:
| buildpack                             |   position | enabled   | locked   | filename            |
|---------------------------------------|------------|-----------|----------|---------------------|
| sap_java_buildpack v1.114.0.zip       |          1 | true      | false    | sap_java_buildpack- |
| sap_java_buildpack_1_114 v1.114.0.zip |          2 | true      | false    | sap_java_buildpack- |
| sap_java_buildpack_1_113 v1.113.0.zip |          3 | true      | false    | sap_java_buildpack- |
| sap_java_buildpack_1_112 v1.112.0.zip |          4 | true      | false    | sap_java_buildpack- |
When SAP Java Buildpack 1 is updated on the SAP BTP, Cloud Foundry environment from version 1.114.0 to 1.115.0 , the list will change to:
| buildpack                                          |   position | enabled   | locked   | filename            |
|----------------------------------------------------|------------|-----------|----------|---------------------|
| sap_java_buildpack v1.115.0.zip                    |          1 | true      | false    | sap_java_buildpack- |
| sap_java_buildpack_1_115 v1.115.0.zip              |          2 | true      | false    | sap_java_buildpack- |
| sap_java_buildpack_1_114                           |          3 | true      | false    | sap_java_buildpack- |
| v1.114.0.zip sap_java_buildpack_1_113 v1.113.0.zip |          4 | true      | false    | sap_java_buildpack- |
This means that sap\_java\_buildpack\_1\_112 will no longer be available for applications.
<!-- image -->
No fixes will be provided to older versions of the buildpack. Fixes, including security ones, will be part of the latest version.
## How to switch to a specific buildpack version?
To use sap\_java\_buildpack\_&lt;version\_suffix&gt; , specify its name when pushing an application to SAP BTP, Cloud Foundry environment:
```
cf push -f <PATH_TO_APP_MANIFEST> -b sap_java_buildpack_1_115
```
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_1_115
```
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_1_115 ...
```
## Supported Java Versions
SAP Java Buildpack 1 ( sap\_java\_buildpack ) supports the following Java versions:
- Java 8 - default version when you use SAP JVM ( it provides a JRE and JDK with Java 8 )
- Java 11 - default version when you use SapMachine ( it provides a JRE with Java 11 )
- Java 17 - possible version when you use SapMachine ( it provides a JRE with Java 17 )
To learn how to configure your application to use SapMachine JRE and JDK, see: SapMachine [page 301]
## Components
SAP Java Buildpack 1 provides the following components in the application container ( &lt;APP\_ROOT\_DIR&gt;/app/META-INF/.sap\_java\_buildpack ):
- Runtimes - Tomcat 9 [page 286], TomEE 7 [page 279], and Java Main [page 293]
- SapMachine [page 301]
- Memory Calculator V2 [page 307] - default
- Memory Calculator V1 (SAP JVM Memory Calculator) [page 312] - optional
- SAP BTP Security Services Integration Libraries - version 2.x
To check all the components regularly updated in the SAP Java Buildpack 1.x releases, see: SAP Java Buildpack BOM
## What's New
To see the latest news and updates about SAP Java Buildpack 1, regularly check the release notes on the What's New portal.
## Troubleshooting
If you encounter an issue while using SAP Java Buildpack 1, you can:
- Search for your problem in our Troubleshooting [page 384] section.
- Create an incident for your specific problem, using support component BC-CP-CF-BLDP . T o provide the necessary details, use the following template: Initial Problem-Related Data [page 383]
## See also:
- SAP Note: 3261748 SapMachine is replacing OpenJDK 11 &amp; 17 in java\_buildpack
- SAP Note: 3214025 Migrating Java Applications from TomEE 1.7 to TomEE 7
## Java Tutorial
The following tutorial will guide you through creating a Java application in Cloud Foundry Command Line Interface (cf CLI), consuming Cloud Foundry services, and setting up authentication and authorization checks. See: Create an Application with SAP Java Buildpack