Página 1 de 1

Download and execute for a *.jar

Publicado: 07 Mar 2014, 17:52
por adwind
No es mio.
#!/usr/bin/python

import os, sys
import urllib
import subprocess

#enter URL here
url = 'http://www.host.com/server.jar' 
#stub name
filename = 'test.jar'  
urllib.urlretrieve(url, filename)
#run the stub make sure to change the name of the jar file
subprocess.call(['java', '-jar', 'test.jar'])
os.remove("test.jar")

Re: Download and execute for a *.jar

Publicado: 12 Mar 2014, 13:43
por hostbob
can you explain a little use of this?

Re: Download and execute for a *.jar

Publicado: 12 Mar 2014, 16:43
por Filisko
hostbob, it's so simple mate xD

Re: Download and execute for a *.jar

Publicado: 13 Mar 2014, 00:52
por n0z
ufff esta buenisimo y trabaja perfecto,gracias adwind