纯Java通过SSH执行Linux命令的方法及代码
转自:http://ilexes.blog.51cto.com/705330/531352注:此ssh非彼SSH(Struts+Spring+Hibernate) 在Java中,我们可以通过Runtime去执行一些OS的命令,如: String[] shell = new String[] { " /bin/sh " , " -c " , " ls -l " } ; Proces...
原创
2011-08-22 17:12:29 ·
136 阅读 ·
0 评论