---------- 运行 ----------
java.lang.NoClassDefFoundError: ReadBytes
Exception in thread "main" 
输出完成 (耗时: 0 秒) - 正常终止为什么有时候运行一个程序就出问题!有时又正常!气死了。望各位大侠帮忙!!

解决方案 »

  1.   

    帮忙看看!
    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());
    }

    }
    }
      

  2.   

    确认class.dat这个文件是否存在
      

  3.   

    现在好像是运行所有的java application都出同样的问题!
    郁闷!
      

  4.   

    你的classpath确认设置好了吗?开始有个点"."代表当前目录如果也设置好了,那看来你的Jdk有问题了.实在不行重新装.因为这个异常是找不到class文件.
      

  5.   

    呵呵...可能是你装的jdk与你用的jdk不是同一个造成的,重装了一下,你的path又重新指定对了...