Capitalization and NoClassDefFoundError vs ClassNotFoundException
I'm seeing differences across platforms about when Class.forName() throws ClassNotFoundException and when it throws NoClassDefFoundError. Is this behavior well-defined somewhere, or have I stumbled across a bug? Consider the following code (which is a standalone java file in the default package): public class DLExceptionType { private static void printFindError(String name) { System.out.print(name + ": "); try { Class.forName(name); System.out.println("** no error **"); } catch (Throwable e) { System.out.println(e); } } public static void main(String[] args) { printFindError("DLExceptionType")