NoClassDefFoundError

An error thrown when a class that was present at compile time cannot be found at run time.

In more detail

It usually means the run-time class path differs from the compile-time one, for example java -jar ignoring -cp. It is an Error, not an Exception. The message names the missing class with slashes.

Example

Exception in thread "main" java.lang.NoClassDefFoundError: com/acme/text/Shout

Related terms

Taught in

References

Certification courses