简体   繁体   中英

Running an uploaded executable Java program with script

I have a simple .sh script, which runs a Java program:

#!/bin/bash
java -jar Test.jar

However, the Test.jar is referencing a .jar file in the folder. I would like to know, whether it's possible to execute a file, that has been previously uploaded to a website. Reason: The script is sent onto (and then ran from) a server, to which I do not have access, which is why I cannot upload the said .jar file onto it.

I've tried with wget , but that command only downloads the file, rather than uses the said file in the script.

What about

#!/bin/bash
wget http://server/Test.jar
java -jar Test.jar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM