What is the difference between NoClassDefFoundException and NoClassDefFoundError. i have found that NoClassDefFoundError occurs when i am using the "new" operator and the class definition is not present while running the program. When does NoClassDefFoundException occur?
NoClassDefFoundException ? what is the fully qualified name for it? is it from sun jdk ?
or you meant java.lang.ClassNotFoundException , if yes please search here or google . there are so many discussions.
NoClassDefFoundError happens when the JVM cannot load a class that is required, almost always because you forgot to include it in the classpath.
ClassNotFoundException happens when you try to load a class via reflection (for example, when doing Class.forName("...")) and the class cannot be found. Usually this also means that the JAR or directory that contains the class file is missing from the classpath.