第一次java编译helloworld出现错误
来源:百度知道 编辑:UC知道 时间:2024/04/30 04:56:13
貌似是classpath错误
错误提示是Exception in thread "main" java.lang.NoClassDefFoundError:HelloWorld
错误提示是Exception in thread "main" java.lang.NoClassDefFoundError:HelloWorld
class HelloWorld{ //类名首字母大写,且文件名与类明要完全相同(HelloWorld.java)
public static void main(String [] args){
System.out.println("HelloWorld");
}
}