NoClassDefFoundError occurs when class was present during compile time and program was compiled and linked successfully but class was not present during runtime.
Add related jar path to Classpath.
In eclipse,you can do it like this:
Project->
Properties->
Java Build Path-> Libraries
Classpath-> Add External JARs