篆体字网 > 知识库

shutdown参数

来源:篆体字网 2024-01-01 21:13:02 作者:篆字君

【KbGolden】:
String str = "ping 127.0.0.1 -t";
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(str);
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
System.out.printf("Output of running %s is:",
Arrays.toString(args));
while ((line = br.readLine()) != null) {
System.out.println(line);
}
【zhblue】:
import java.awt.*;
import java.io.*;
import java.awt.event.*;
public class Ss{
//public String a="-s";
public static void main(String args[]){
try{
Runtime ce=Runtime.getRuntime();
String cmd=new String ;
ce.exec(cmd);
}catch(Exception e){
System.out.println("错误");
}
}
}

上一篇:iphone美化

下一篇:when a child is born

相关阅读