SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
β€’ Open full site

Create a Sample Application on Cloud Foundry Using SAP Cloud SDK

Create the very first Hello World example on Cloud Foundry using the SAP Cloud SDK.

Overview

🎓 intermediate 20 min. SAP Cloud SdkIntermediateSAP S 4hanaSAP Business Technology PlatformCloudJava
Junjie Tang J Junjie Tang May 15, 2025
Created by July 12, 2019
Contributors

Prerequisites

Steps

Step 1 Setup for Cloud Foundry
β€”

In order to deploy applications to SAP Business Technology Platform Cloud Foundry, you need to create a free trial account. You can create your account by following this tutorial.

After creating your account and activating it via email, you can log in to your personal Cloud Cockpit. For your first visit, it should look like this:

SAP BTP Cockpit first view
SAP BTP Cockpit first view

After selecting your region, your account will be automatically set up for development with Cloud Foundry.

Clicking on “Enter Your Trial Account” will lead you to your account overview:

SAP BTP account overview
SAP BTP account overview

Now that your account is activated and configured, you will need the Cloud Foundry command line interface (CF CLI) to deploy and manage your Cloud Foundry applications.

To install the CLI, you can grab the latest release on the official release page.

In order to deploy applications on SAP Cloud Foundry you need to provide the CF CLI with an API endpoint. The API endpoint depends on the region you chose for your account:

  • for EU: https://api.cf.eu10.hana.ondemand.com
  • for US EAST: https://api.cf.us10-001.hana.ondemand.com
  • for US CENTRAL: https://api.cf.us20.hana.ondemand.com

Now enter the following commands (in this case for the US region):

Shell
cf api https://api.cf.us10-001.hana.ondemand.com
cf login

The CLI will ask you for your mail and your password. After entering these, you should be successfully logged in.

Note: The CF CLI stores the information locally in a ~/.cf/config.json file. Further authentication relies on a JWT that expires after some time, so you don’t have to login every time you want to push your app to the cloud.

Step 2 Generate project from archetype
+
Step 3 Understand the project structure and its artifacts
+
Step 4 HelloWorldController
+
Step 5 Deployment
+
Step 6 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Setup for Cloud Foundry 2. Generate project from archetype 3. Understand the project structure and its artifacts 4. HelloWorldController 5. Deployment 6. Test yourself

Learn more →