简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM