路径不对 ,你的firstapple.java在jdk/bin下吗?

解决方案 »

  1.   

    有时还会出现"exception in thread "main"  java.lang.NoclassDefFoundError: firstapp.java
      

  2.   

    原程序如下.
    /** This program display a sample
    String on computer screen !
    */
    class FirstApp{
    public static void main(String[ ] args){
    System.out.println("Java is a good language");
    }
    }出现的错误提示是
    exception in thread "main" java.lang.noclassdeffound error
      

  3.   

    在环境变量中把当前目录加入到classpath中,
    或者在运行javac firstapple.java之前运行
    set classpath=.;%classpath%