UnsupportedClassVersionError

Description : java.lang.UnsupportedClassVersionError:Bad version number in .class file  Cause: When code was compiled on a new version of Java and user is trying to run it on the older version of Java Possible Solution :  Make sure that both the versions are same.  

NoClassDefFoundError and ClassNotFoundException

NoClassDefFoundError and ClassNotFoundException
NoClassDefFoundError is an Error ,occurs when the source  was successfully compiled but at runtime, the required class files were not found. It may also arise when the class is already loaded in different classloader(usually a parent classloader would have loaded the class and hence the class cannot be loaded again) or if an incompatible class definition ...