Chapter 12

Developing with Java


  • Understanding Java
  • Writing enterprise applications on Heroku
  • Installing the Java Development Kit
  • Managing dependencies
  • Writing a containerless application with embedded Jetty
  • Writing an application with the Spring Framework and Hibernate on Apache Tomcat
  • Writing an application with the Play framework
  • Deploying a Web application ARchive (WAR) file directly to Heroku
  • Additional considerations


The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 12 download and individually named according to the names throughout the chapter.

This chapter explores how Java apps can be written and deployed on Heroku. Java has evolved from a simple, portable language to a powerful development platform that has spawned other languages that run on this common platform. In recent times, development on Java has also evolved from built-for-distribution, where developer operations (DevOps) teams are required to deploy apps infrequently, to built-for-deployment, where rapid and continuous deployment of incremental improvements is favoured.

To test apps before deploying them to Heroku, you must first install the Java Development Kit (JDK) on your workstation. Java uses Apache Maven for managing dependencies and building your Heroku apps. The embedded Jetty web server is a popular tool used for running containerless ...

Get Professional Heroku Programming now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.