简体   繁体   English

如何在远程Windows计算机上从Java运行批处理脚本

[英]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. 我有一台使用open ssh和cygwin(copssh)在Windows机器上的ssh上运行批处理脚本的机器,我希望更改此机制,因为该工具需要配置,因此可能会犯许多错误。 I will also need to collect the results of the script Any ideas on how it can be done? 我还需要收集脚本的结果关于如何完成脚本的任何想法?

Thanks 谢谢

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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