3

I am new to Heroku. The backend logic of my flask web app is actually running a Java subprocess (subprocess.call( ...) ) to get some helper data. (I know it's a bad thing to do)
On deployment, Heroku works as expected and installs Python runtime and frameworks from requirements.txt but not JDK.

Any way I can configure Java in the same and make this work ??

1 Answer 1

7

Run the following command:

$ heroku buildpacks:add heroku/jvm

Then redeploy with a git push heroku master. This will install the JDK into your slug.

Sign up to request clarification or add additional context in comments.

3 Comments

tried this. But on launching heroku run bash, i am still getting - java : 'command not found'.
Try git commit -m "redeploy" --allow-empty and then git push heroku master
This actually solved the problem. Sorry for accepting late!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.