Java执行命令行下命令方法

Process myProcess = Runtime.getRuntime().exec("ipconfig"); InputStreamReader ir = new InputStreamReader(myProcess.getInputStream()); LineNumberReader input = new LineNumberReader (ir); String line; while ((line = input.readLine ()) != null) System.out.println(line);  

 

你可能感兴趣的:(java,String,null,input)