NoClassDefError doesnt tell you which class?

With this error:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NoClassDefFoundError.html

I can’t see how you can find out what the missing class is!

What the heck’s the point of an error that tells you “one of your classes, of which you have many hundreds by default, probably thousands, is missing. But you’re not allowed to know which one” ?

Do I really have to write a parser to parse the exception text message and guess at the name of the missing class ?!? Surely some mistake…Am I being really stupid (probably)?

Undocumented feature:

  1. NoClassDefFoundError.getMessage() does NOT return the message that is displayed if you do not catch it!

  2. Instead, it returns the fully qualified class name of the missing message

  3. …although unfortunately it puts slashes in the name where there should be dots. I can’t test whether it is always slashes, always the same direction slashes, etc; just have to implement slash replacer and then wait for it to break on someone’s machine (windows, OS X?)