Process process = new RuntimegetRuntime()exec(command); // command为unix命令,如"ls"等
BufferedReader results = new BufferedReader(new InputStreamReader(processgetInputStream()));
String s;
while((s = resultsreadLine()) != null) {
Systemoutprintln(s);
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)