How to push application in PCF

After successfully installing CF CLI and creating our account in Pivotal Cloud Foundry, it is the time to push our first application in PCF. We are going to push a java spring boot application in PCF and a demo application developed for this purpose is available Hello world PCF application. Let’s start to push our first application in PCF step by step.

  1. Download the application from the above location and unzip it.
Download hello world java program for PCF push.

2. Go to the folder location and run the maven command mvn clean install. Please refer maven documentation, if maven is not installed in your system.

3. Above command will create a “pcf-1.0.0.jar” file in the “target” folder of the project.

4. Go to terminal and navigate to the folder location where you have the above “.jar” file.

5. Log in your account from CF CLI. Refer “let’s start” step 3 for details.

6. You will log in organisation “devworld” and space “development”. Please refer on screen instruction if you have more than one organisation and space. After successful login, you will get a screen like this:

PCF cli successful login.
Successful login

7. Now type the command “cf push pcfwelcome -p pcf-1.0.0.jar”. The format is “cf push <application name of your choice>¬† -p <jar file name with .jar extension>.

8. It will start pushing your application into PCF environment. It will take sometime and after successful push you will get a screen like:

java application successfully pushed in PCF.
Application pushed successfully in PCF.

9. Type “cf apps” in terminal. ( make sure you do not logout from CF CLI). You will get a screen with your application URL.

how to get an application url in PCF.
Application URL

10. Go to your browser and type the url append with endpoint “/welcome” i.e <your url as shown in previous step>/welcome. You will get a response from browser as :


Access application from browser after PCF push.
PCF hello world

11. You can also check your application and find the url by log in Pivotal. Go to your organisation ( “devworld” here) and space (“development” here) , you will find the application “pcfwelcome” ( the application name that we have given during push time).

12. Click on the application name, you will get the details of the application, in a screen like below:


Application details from Pivotal Cloud Foundry.
Access application from PCF GUI.


Congratulation. Application has been pushed successfully in Pivotal Cloud Foundry.

Code : Git location.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.