---------- 运行 ----------
java.lang.NoClassDefFoundError: ReadBytes
Exception in thread "main"
输出完成 (耗时: 0 秒) - 正常终止为什么有时候运行一个程序就出问题!有时又正常!气死了。望各位大侠帮忙!!
java.lang.NoClassDefFoundError: ReadBytes
Exception in thread "main"
输出完成 (耗时: 0 秒) - 正常终止为什么有时候运行一个程序就出问题!有时又正常!气死了。望各位大侠帮忙!!
import java.io.*;
public class ReadBytes
{
public static void main(String[] args)
{
try{
FileInputStream file =new FileInputStream("class.dat");
boolean eof =false;
int count=0;
while(!eof){
int input = file.read();
System.out.print(input+" ");
if(input ==-1)
eof=true;
else
count++;
}
file.close();
System.out.println("\nBytes read: "+count);
}catch(IOException e){
System.out.println("Error --" +e.toString());
}
}
}
郁闷!