Answers for "Python runs java program using variables"

0

Python runs java program using variables

import sys, string, os
import colorama
import subprocess
from colorama import Fore, Back, Style
colorama.init()

print(Fore.RED + "some print. color red")

1 = input("1: ")
2 = input("2: ")
3 = input("3: ")
4 = input("4: ")
5 = input("5: ")

os.system("java -jar example.jar " + " " + 1 + " " + 2 + " " + 3 + " " + 4 + " " + 5) 

# output in cmd line: java -jar example.jar 1 2 3 4 5
# Instead of numbers, there will be your variables that you specified
Posted by: Guest on August-25-2021

Code answers related to "Python runs java program using variables"

Python Answers by Framework

Browse Popular Code Answers by Language