问题
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:
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.
来源:https://stackoverflow.com/questions/44749732/running-a-java-subprocess-from-a-python-app-in-heroku