帮忙看极简单一段java原文件有没有错误?

来源:百度知道 编辑:UC知道 时间:2024/06/28 05:58:25
public class hello {
public static void main (String[] args)
{
System.out.println("www.zhangyong.org");
}
}

结果是

Exception in thread "main" java.lang.NoClassDefFoundError: hello
什么意思?
呵呵
解决了
我的classpath没有带当前目录
呵呵
低级错误

环境变量配制错误。

public class hello

类名前 不要加public

可以啊,没什么问题啊。
你是不是没有编译啊!

楼上(wokaobb)学了多久了?
没有碰见过你这样的情况.
没发现什么问题,把你的程序再写一遍
//Hello.java
public class Hello{
public static void main(String[] args){
System.out.println("Hello,world!");
}
}

...........大家把我的话都说完了,我没得说了