import subprocess

def add_to_jar(file2add, jar_file):
    cmd = 'jar -uf ' + jar_file + ' ' + file2add
proc = subprocess.Popen(cmd, shell=True)
add_to_jar(file_to_add, jar_file)
Edit jar files with python