篆体字作品 | 篆体字知识 | 加入收藏 篆体字转换器软件可转换多种篆体字在线预览 网页版 V2.0
篆体字转换器

当前位置:篆体字网 > 知识库 >

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("错误");
}
}
}

Copyright:2021-2023 篆体字转换器 www.dddtedu.com All rights reserved.