Skip to content

Best way to invoke from a python program #1665

Closed Answered by answerquest
answerquest asked this question in Q&A
Discussion options

You must be logged in to vote

Got it! Have to add this line in my dockerfile:

RUN apt update && apt install -y default-jre 

Note: This is valid for my debian OS based docker image python:3.12.1-slim-bookworm. There may be other commands for yours if you're using alpine etc. Please lookup online for "how to install java runtime environment in [your docker OS]".
You can find out by doing a docker build with just RUN apt update and seeing where the libs etc are being fetched from. In my case it showed debian. Else look up the publisher of your base docker image.

I included the .jar in my code folder, it's sitting next to my python files.
Once this is baked in, I'm able to successfully run this shell command from my py…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by answerquest
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants