有时还会出现"exception in thread "main" java.lang.NoclassDefFoundError: firstapp.java
原程序如下. /** 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
在环境变量中把当前目录加入到classpath中, 或者在运行javac firstapple.java之前运行 set classpath=.;%classpath%
/** 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
或者在运行javac firstapple.java之前运行
set classpath=.;%classpath%