Search overlay panel for performing site-wide searches
Salesforce (Heroku) Named a Leader. Learn More!
Illustration of a round character wearing traditional samurai armor and helmet on an orange background, waving with one hand.

Deploy modern JVM-based apps

Polyglot JVM Platform for modern apps

Deploy

Deploy using Git, GitHub or directly from your CI system using precompiled builds with tools like SBT or Maven. Regardless of how your source is delivered, Heroku runs it in a dyno – a smart, secure, curated container with your choice of JVM version.

Manage

Manage your portfolio of apps in a single view using a straightforward Dashboard. Instantly see what version of your app is deployed and rollback to a stable version without recompiling. Manage your app’s environment specific configurations with external config vars.

Scale

Heroku’s horizontally scalable, share-nothing architecture is perfect for apps built with modern frameworks like Play, that are async, stateless and non-blocking. Heroku makes scaling out or up as simple as dragging a slider in the Dashboard or using a single CLI command.

Monitor

View detailed memory and garbage collection metrics in your Dashboard with JVM runtime metrics. Connect remote debuggers and inspection tools like VisualVM, or generate heap and thread dumps on demand to help track down even the most elusive bugs.

Get started now with Java on Heroku

Java/Spring

new Heroku(Cloud::example);

  • Initialize our Java app with Spring
  • Specify start command in Procfile
  • Respond to requests with ‘Hello World’
  • Provision an app with heroku create
  • Deploy with git push heroku main
  • We’re live! curl secret-journey7988.herokuapp.com

View the Docs

Play/Scala

val example = new Cloud[Heroku]

  • Initialize our Play app with activator
  • Provision an app with heroku create
  • Deploy with git push heroku main
  • We’re live! curl infinite-fjord-7245.herokuapp.com

View the Docs

Clojure

(def example [heroku cloud])

  • Initialize our Clojure app with leiningen
  • Provision an app with heroku create
  • Deploy with git push heroku main
  • We’re live! curl gentle-inlet-7996.herokuapp.com

View the Docs

Why JVM Languages on Heroku?

Choice of language and framework

Build microservices with Groovy and Ratpack, reactive APIs using Scala and Play, web apps with minimal fuss using Spark and high performance web apps with Spring Boot/Spring Cloud. Heroku provides buildpacks for Java, Scala, Play, Clojure, Gradle and Grails.

Java on Heroku

Curated language stacks, intelligent defaults

Get early access to the latest JDK as soon as it’s available. Heroku runs your app on the latest stable version, Java 8, by default. Heroku sets intelligent defaults for your max heap size and stack size based on the size of the dyno smart container your app is running in.

Heroku’s Java support docs

Extend your apps with 200+ Add-ons

Heroku add-ons like CloudAMQP, Postgres, Redis, Treasure Data (Hadoop as a service) and GrapheneDB (Neo4J as a service) allow you to extend, manage and deploy modern JVM-based applications without operational overhead.

All Heroku Add-ons

Built-in debugging and inspection tools

Heroku’s Metrics dashboard helps you identify many kinds of performance problems, while key language specific metrics, like garbage collection activity and memory usage, are included in Heroku’s Language runtime metrics dashboard. After you’ve identified an issue, you can use Heroku Exec to connect to a running dyno via SSH.

Language runtime metrics docs

A red circle sits on top of a black, curved shape resembling an abstract letter A against a white background.

Java on Heroku

“Whether you are a business or a hobby developer, the JVM offers a mature and reliable platform to power your apps. You can choose the programming language that works best for the task at hand because of the ployglot nature of the JVM. Heroku offers extensive support for this ecosystem, enabling you to operate your business or side-project with confidence.”

A person with dark hair looks down against a graffiti-covered wall.

Manuel Fuchs

JVM Languages Owner

Popular Add-ons

Add-ons are fully-managed services, integrated for use with Heroku, which provide services for logging, caching, monitoring, persistence and more.
View All Add-ons

Heroku Kafka

Data Stores

Heroku Postgres

Data Stores

A geometric design with interlocking green and dark gray rectangular shapes forming a 3D-like structure on a white background.

New Relic APM

Monitoring

Illustration of a stylized dog's head, resembling a Doberman, centered on a shield-shaped background with shades of purple and gray.

Snyk

Security

Blue square with a white geometric logo featuring a three-dimensional shape composed of lines and angles.

Rollbar

Errors and Exceptions

Groovy text forms steam rising from a coffee cup, reading: "Atomic Jolt Rises From Its Lively Origin Bold Wakener.

Download our Java haiku illustration

Enjoy the Heroku-created Java haiku illustration wallpaper for your desktop, tablet, and mobile screens.

Ready to Get Started?

Stay focused on building great data-driven applications and let Heroku tackle the rest.

Sign Up Now

OSZAR »