NoClassDefFoundError in Java — What It Means and How to Fix It
What Java's NoClassDefFoundError means and how to fix it.
Published November 3, 2026
NoClassDefFoundError is thrown when a class that was available at compile time is missing at runtime.
Key points
- Read the full stack trace from the top — it names the exact class, method, and line where the exception originated
Example
Distinct from ClassNotFoundException — this typically means the class compiled fine but its JAR isn't on the runtime classpath