Chapter 12

Developing with Java

WHAT’S IN THIS CHAPTER?

  • 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

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118508998 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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.