Java执行sh等

1.通过java代码,调用bat、shell等脚本或者命令

1)使用Runtime的exec()方法,会返回一个用于管理操作系统进程的Process对象

Process process =null;
process = Runtime.getRuntime().exec(command); 
process.waitFor();
原文地址:https://www.cnblogs.com/jiktiv123/p/7682128.html