bat文件内容呢,放出来看看,它正常应该输出什么结果吗,如果本来就不输出结果当然读不出来
如果它会print结果,那你也要把输入输出重定向到管道,才能读取
// 创建进程
class Process{
private String name; // 进程名
private int arriveTime; // 到达时间
private int runtimeLength; // 执行长度
private static int count = 0; // 进程数目
public Process(String name,int arriveTime,int runtimeLength){
this.arriveTime = arriveTime;
this.name = name;
this.runtimeLength = runtimeLength;
}
public static void setCount(int count) {
Process.count = count;
}
public static int getCount() {
return count;
}
public String getName() {
return name;
}
public double getArriveTime() {
return arriveTime;
}
public int getRuntimeLength() {
return runtimeLength;
}
@Override
public String toString() {
return "ProcessName: "+getName()+" ProcessTime: "+getArriveTime()+" ProcessLength: "+getRuntimeLength();
}
}