Java
With Heroku you can instantly deploy and scale any of your Java applications to the cloud. This developer guide will walk you through a series of articles to help you understand how to build and deploy Java applications on Heroku.
If you would like to understand how the Heroku Platform works, read the Heroku Platform Basics. You can also read the Heroku for Java EE developers article for some key design principles to keeping mind when building and deploying Java applications on Heroku.
Deploy a Java web application with an embedded container
You can use any embedded container that you like in your application on Heroku. Learn how to use Maven as the build tool and Jetty as the embedded container.
Other embedded containers
You can also learn how to use Tomcat 7 or Jetty-Runner.
Run Java worker processes on Heroku
An application on Heroku is composed of one or more processes. This can include a web process and one or more non-web processes to perform background or admin tasks. Learn how to build and deploy worker and one-off admin applications in Java.
Connecting to Relational Databases on Heroku with Java
Applications on Heroku can use a variety of relational database services including the Postgres database offered by Heroku and MySQL offered by AWS. You can connect your Java application to relational databases using plain JDBC or within a Spring application or within a Play! application.
Deploy a Spring and Hibernate app
If you are a Spring developer you can get started building and deploying Spring MVC applications.
Working with Heroku addons
Heroku provides a rich selection of addons. You can install these to provide additional application services like Performance Management, Log monitoring, NoSQL databases etc. Below are a few articles to get you started on some of these addons:
Run Play! Framework apps on Heroku
Heroku has direct support for running Java and Scala applications built with the Play Framework. Learn how to build a simple Play web application and deploy it to Heroku.
Connect a Play! app to the Heroku Postgres Database
Using environment variables in your Play! config makes it easy to connect a Play! app to the Postgres database that is automatically created for each application created on Heroku.
Run Grails Framework apps on Heroku
Heroku supports the Grails framework as well. Learn how to deploy a Grails application to Heroku.
Performance Management on Heroku using New Relic addon
Monitoring is an important part of any aplication. The New Relic add-on for Heroku can help with your application performance management needs in the cloud.
If you still have questions:
- Consult the Java on Heroku FAQ
- Ask a question on StackOverflow.com
- Ask a question on the Heroku Google Group
Articles
- Adding Unmanaged Dependencies to a Maven Project
- Connecting to Relational Databases on Heroku with Java
- Create a Java Web Application using Embedded Tomcat
- Deploy a Java Web Application that launches with Jetty Runner
- Frequently Asked Questions about Java
- Getting Started with Grails web apps on Heroku/Cedar
- Getting Started with Java on Heroku/Cedar
- Getting Started with Spring MVC Hibernate on Heroku/Cedar
- Introduction to Heroku for Java Developers
- Learn More about Heroku for Java
- Run non-web Java processes on Heroku