import java.io.*;public class CountBytes {
public static void main(String[]args) throws IOException{
InputStream in;

//get the file name
if(args.length==0)
in=System.in;
else
in=new FileInputStream(args[0]);
//count the byte of file
int total=0;
while(in.read()!=-1)
total++;
System.out.println(total+"bytes");
}
}这个程序在eclipse运行后,我在Console里敲进文件名,enter后没反应的eclipse里的console窗口是不是只用于输出的,要读取键盘输入怎么办,可不可以调用dos的?