
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
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.
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.
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.
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.
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.”

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

New Relic APM
Monitoring

Snyk
Security

Rollbar
Errors and Exceptions
Popular Buttons
Heroku Buttons let you one-click provision, configure and deploy applications to Heroku.
View All Buttons

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.