Running the jar file in a python script? #1202
Answered
by
W3bParserV2
mattcutini
asked this question in
Q&A
-
Is there a recommended way to run the synthea jar file within a python script? I'm trying to use subprocess.call() but it appears to not accept the flags that I'm trying to add. |
Beta Was this translation helpful? Give feedback.
Answered by
W3bParserV2
Nov 25, 2022
Replies: 1 comment 2 replies
-
Have you tried the os.system package ?Try to run it by the following way? This is what i mean : import os And when you want to run your jar file, call os.system like this : os.system('cmd /c "jar -jar file.jar"') Try it and send me the output if it doesn't work. If you want just open the jar file and not run it, do this : os.system('cmd /c "jar xf file.jar"') |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mattcutini
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried the os.system package ?
Try to run it by the following way? This is what i mean :
At the start of your python script write this :
And when you want to run your jar file, call os.system like this :
Try it and send me the output if it doesn't work.
If you want just open the jar file and not run it, do this :