How can I add Java to a non-Java app?


Your application needs a particular Java version but it isn't a Java or JVM app.


Applications in languages other than Java can install a particular JVM using the heroku-jvm-common buildpack.

Add this buildpack to the start of the buildpacks list in your app:

$ heroku buildpacks:add -i 1

This is a utility buildpack that only installs Java, so it doesn't require the app to be written in Java. But it does require a file in the app to specify the Java version to install.

Add a file to your project called, you can add the version of Java you need. Consult the Dev Center article here for the exact format of the file and the Java versions supported.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018