简体   繁体   中英

How can I run a batch script from java on a remote windows machine

I have a machine that runs batch scripts over ssh on windows machine using open ssh and cygwin (copssh) I'm looking to change this mechanism since this tool requires configuration where many mistakes can be made. I will also need to collect the results of the script Any ideas on how it can be done?

Thanks

您可以使用RMI,而在远程端只需使用Runtime.getRuntime()。exec

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