Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
NoClassDefFoundError exception occurs when Java
Virtual Machine is not able to find a
particular class
at runtime which was available during compile time. for example
if
we have a method call from a class or accessing any
static member of a Class and that
class is not available
during run-time then JVM will throw NoClassDefFoundError.
It is important to understand that this is different than
ClassNotFoundException which
comes while trying to load
a class (by using Class.forName()) at run-time only and name
was provided during runtime not on compile time.
To solve this :
• Please check if the
required Jar file is there in classpath by printing the
classpath
as follows"system.getParamter("classpath");"
Or ECHO classpath in Server start up file.
• Please get and add the
Jar file to class path as shown in above question.
java -cp yourJar.jar yourClass
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.