Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a java subprocess from a python app in Heroku

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 ??

like image 295
Amartya Avatar asked Sep 19 '26 23:09

Amartya


1 Answers

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.

like image 104
codefinger Avatar answered Sep 22 '26 11:09

codefinger