我是刚学JAVA的 在运行一个简单的JAVA程序时 如果出现以下的提示一般是哪里出现错误了啊:
Exception in thread "main" java.lang.NoClassDefFoundError: 后面是你public class 的那个类名
Cause by:java.lang.Urlclassloader.run(..)
        at ..
        at ..
        at ..
         .
         .
Could not find the main class: 类名 .Program will exit
我是刚学的 不知道 到底是为什么??

解决方案 »

  1.   

    我也是刚学的java,是不是main函数所在的类和你那个.java文件的名字不相同啊。
      

  2.   

    Could not find the main class: 类名 .Program will exit 这个提示还不详细?
      

  3.   

    你的类里面没有定义main函数吧
      

  4.   

    粘贴代码哈
      首先检查环境变量的设置
      然后看main方法是否出错了!
      

  5.   

    粘贴代码哈 
      首先检查环境变量的设置 
      然后看main方法是否出错了!