In another installment of the SAP HANA Academy’s series on the SAP HANA Cloud Platform Jamie Wiseman demonstrates how to create a Hello World Java application in the SAP HANA Cloud Platform.


This tutorial begins where the previous video in the series which details how to set up an Eclipse IDE finishes.

Creating a Dynamic Web Project in Eclipse (0:28 – 1:13)

First in Eclipse select File from the menu bar, scroll to New and choose Dynamic Web Project. In the Project Name text box enter Hello World. Leave the default of SAP HANA Cloud in the Target Runtime box.  Leave the other values as they are and click the Finish button to conclude the wizard.  

Creating a Hello World Servlet (1:13 – 2:34)

In the newly created Dynamic Web Project open the Hello World node in the Project Explorer menu and then right click on Hello World, scroll over New and then down to Servlet. In the Servlet wizard type in hello for the Java package and HelloWorldServlet for the Class name. 

After clicking the Next button double click on /HelloWorldServlet in the URL mappings box and then click the Edit… button. Replace the current value with just a / so that the servlet is mapped to the root path of the application similar to a common index HTML welcome file. Now select Finish to generate the servlet.

The Java editor will now open the corresponding Hello World servlet class in the editor pane. 

Screen Shot 2014-08-18 at 7.23.25 PM.png

Now change the line of code for the doGet method in the Java editor. Change the code highlighted above in blue to the snippet of code below.

Screen Shot 2014-08-18 at 7.24.45 PM.png

After changing the doGet method save the changes.

Deploying Application on Local Runtime (2:34 – 3:30)

To deploy the application on the local runtime first navigate to the servlet by expanding the Java Resources node, then by the src node, and finally the hello world node in the Project Explorer. Now right click on the servlet, scroll over Run As and choose Run on Server to launch the wizard.

Select SAP HANA Cloud Platform local runtime from the list of available server types before clicking finish. Within the server tab you should now see the newly created local server.

In the main area a new internal web browser will open up with the respective Hello World URL and display the expected result.

Deploying the Application in the Cloud (3:30 – 5:45)

Right click on the server and choose Run As followed by Run on Server. Now choose Manually define a new server and this time select SAP HANA Cloud Platform. Next change the Landscape host as appropriate. If you’re using a free developer edition of SAP HANA Cloud Platform the Landscape host should be changed to hanatrial.ondemand.com. Once the Landscape host is changed click the Next Button.

On the following wizard page you must maintain the information and credentials from your developer’s edition of SAP HANA Cloud Platform on the trial landscape. Note that your account name should end with a trial suffix in case you deploy your application to the trail landscape. Make sure your account name is entered in lower case. When done the wizard should look like the screen shot below before pressing Finish.

Screen Shot 2014-08-18 at 8.11.22 PM.png

Depending on the speed of your internet connection the deployment may take a few minutes. Once the deployment is completed another internal web browser window will open up with a respective URL for hanatrial.ondemand.com.

Now that you’re familiar with the basic routine of developing applications and deploying them locally and to the cloud you may want to explore the SDK samples listed here.

Check out Jamie’s video on creating a Hello World application with Java development on the SAP HANA Cloud Platform.

Screen Shot 2014-08-19 at 9.38.11 AM.png

View more tutorial videos about SAP HANA Cloud Platform at the SAP HANA Academy.


SAP HANA Academy – over 500 free tutorial technical videos on using SAP HANA.


-Tom Flanagan

SAP HANA Academy

Follow @saphanaacademy

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply