Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Class.forName causing ClassFormatError when class not found

843807Aug 26 2003 — edited Aug 31 2003
I'm using code in an applet that checks to see if a class is available by doing Class.forName and catching any exception. Normally this should throw a ClassNotFoundException which would be caught. However, it is throwing a ClassFormatException with the message "Truncated class file". The class is not available. Does anyone have any idea what is happening?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2003
Added on Aug 26 2003
3 comments
475 views