62,623
社区成员
发帖
与我相关
我的任务
分享import java.io.IOException;
import java.io.*;
public class compile {
public static void main(String[] args){
try {
InputStream p = Runtime.getRuntime().exec("cmd /c ipconfig -all").getInputStream();
BufferedReader b = new BufferedReader(new InputStreamReader(p));
String s = "";
while( (s = b.readLine()) != null)
{
System.out.println(s);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}