I have gone through this thread What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException? This is what one of the ans,which has max u
The other answers in this thread are correct, i just want to add something i spent hours trying to figure out. Even if
Class.forName("apache.some.SomeLegitClass")
works,
Class.forName("apache.some.somelegitclass")
will result in a NoClassDefFoundError. The Class.forName() is case-sensitive. It will result in different exceptions if the classname is spelled wrong, or simply has incorrect casing.