香港带手机怎么过关:java能编译但是不能运行是什么原因呢
来源:百度文库 编辑:高考问答 时间:2024/05/03 04:47:41
Exception in thread "main" java.lang.NoClassDefFoundError: Example是这样提示的 小弟刚学java 我写的java源文件是Example.java
编译能通过代表语法没错。
引起该Exception的如果不是环境的问题,应该是你没在main函数所在的类的声明前加上public,如:
public class Example
{
}