Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ClassNotFoundException and ClassDefNotFoundException

What is the difference between ClassNotFoundException and ClassDefNotFoundException I know that both are subclass of Exception.

Got some explanation for ClassNotFoundException from this question. What is the difference between NoClassDefFoundError and ClassNotFoundException?

I read Java doc for ClassDefNotFoundException and it says:

ClassDefNotFoundException is thrown when the definition of a class cannot be found be the OWB typing system.

Please elaborate above statement, I am unaware of OWB typing system. And what exactly is the difference between both the classed and when these Exceptions are raised.

like image 799
Vishrant Avatar asked May 09 '26 23:05

Vishrant


1 Answers

ClassNotFoundException is a core Java exception.

ClassDefNotFoundException is an "Oracle Warehouse Builder" exception (which in all likelihood just wraps a ClassNotFoundException).

like image 87
Larry Avatar answered May 12 '26 11:05

Larry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!