Skip to content

Running the jar file in a python script? #1202

Answered by W3bParserV2
mattcutini asked this question in Q&A
Discussion options

You must be logged in to vote

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 :

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"')

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mattcutini
Comment options

@W3bParserV2
Comment options

Answer selected by mattcutini
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