importjava.io.*;publicclassdoscmd3{publicstaticvoidmain(Stringargs[]){try{Processp=Runtime.getRuntime().exec("cmd/cawsstart");p.waitFor();BufferedReaderreader=newBuffered...
import java.io.*;
public class doscmd3
{
public static void main(String args[])
{
try
{
Process p=Runtime.getRuntime().exec("cmd /c aws start");
p.waitFor();
BufferedReader reader=new BufferedReader(
new InputStreamReader(p.getInputStream())
);
String line;
while((line = reader.readLine()) != null)
{
System.out.println(line);
}
}
catch(IOException e1) {}
catch(InterruptedException e2) {}
System.out.println("Done");
}
}
展开