不太清楚好像是main方法出错了吧?

解决方案 »

  1.   

    classpath中缺少要用到的package的引用
      

  2.   

    NoClassDefFoundError:Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found. 把出错代码贴出来看看
      

  3.   

    1:文件名和主类名是不是一致?
    2:path设置得是否对?不知是什么平台,path:(d:\jdk1.2.2\bin;)
    3: 如果这两个都没有问题的话,是不是安装有问题,我不知用的是不是Jbuilder,如果是的话,试着重新安装一下!!!
      

  4.   

    每次运行 执行程序的时候先运行autoexec(在dos下),如果你的环境变量设好的话
      

  5.   

    每次执行前先运行autoexec(在dos下),如果你的环境变量设好的话
      

  6.   

    PATH=%PATH%;C:\j2sdk1.4.0\bin
    set CLASSPATH=C:\j2sdk1.4.0\jre\lib\rt.jar;.
    不行
      

  7.   

    在c:\autoexec.bat中加入
    SET path="d:\jdk1.3.1\bin\";"%path%";
    SET classpath=.;%path%d:\jdk1.3.1是我的安装路径 你要根据情况改
    SET classpath=.;%path% 中"."表示当前路径
      

  8.   

    试试:运行:java -classpath . 文件名.如果可行,一定是classpath设的问题.再试试.