请教java清屏
import java.io.*;
public class cls {
public static void main(String[] args) {
//clear the screen(for Windows System)
try
{
Process process = Runtime.getRuntime().exec ("cls");
InputStreamReader ir=new InputStreamReader(process.getInputStream());
LineNumberReader in = new LineNumberReader (ir);
String line;
while ((line = in.readLine ()) != null)
System.out.println(line);
}
catch (Exception e) {
System.err.println ("IOException " + e.getMessage());
}
System.out.println("Hello");
System.out.println("How are you!");
}
}
我在win下运行为什么就会发生IOException