Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5pUjAyJuUaNEQqzGJ
19 lines
1.0 KiB
Plaintext
19 lines
1.0 KiB
Plaintext
|
|
== 1. ClassNotFoundException: asking by name for a class nobody has ==
|
|
java.lang.ClassNotFoundException: com.acme.DoesNotExist
|
|
checked exception? true
|
|
|
|
== 2. NoClassDefFoundError: compiled against Dep, Dep.class missing at run time ==
|
|
with Dep.class present: Dep is here
|
|
...Dep.class deleted from disk...
|
|
same loader, Dep already loaded: Dep is here (the loader cached it)
|
|
fresh loader, Dep never loaded:
|
|
java.lang.NoClassDefFoundError: com/acme/missing/Dep
|
|
caused by: java.lang.ClassNotFoundException: com.acme.missing.Dep
|
|
is an Error, not an Exception: true
|
|
|
|
== 3. NoClassDefFoundError: "Could not initialize class" (the class file is fine) ==
|
|
attempt 1: java.lang.ExceptionInInitializerError, cause java.lang.NumberFormatException: For input string: "not-a-number"
|
|
attempt 2: java.lang.NoClassDefFoundError: Could not initialize class com.acme.initfail.Broken
|
|
cause: java.lang.ExceptionInInitializerError: Exception java.lang.NumberFormatException: For input string: "not-a-number" [in thread "main"]
|