Friday 1 August 2014

NoClassDefFoundError Vs ClassNotFoundException

1. ClassNotFoundException is a checked exception, where as NoClassDefFoundError is of type Error.

2. NoClassDefFoundError is a linkage error, thrown when a class 'A' has dependency on other class 'B', latter compilation of class A, class B changed or removed.

ClassNotFoundException may thrown while application tries to use the below methods.

     Class.forName(java.lang.String),
     ClassLoader.findSystemClass(java.lang.String),  
     ClassLoader.loadClass(java.lang.String, boolean)

Related Links


                                                             Home

No comments:

Post a Comment