I have created a jar file.I copy this jar file into remote machine using ssh in java.
I want to execute this jar file from my machine and see the result in my machine.
java -jar <filename>
I use
Runtime.getRuntime().exec("java -jar hellofile.jar");
Any suggesions ? Please answer
If the remote machine is linux, you can execute through ssh:
ssh [email protected] 'java -jar hellofile.jar'
and you will see the result in the terminal
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments