Running a java subprocess from a python app in Heroku

爷,独闯天下 提交于 2019-12-08 03:54:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!