RSS Feed

NoClassDefFound

NoClassDefFound means “No Class Definition Found”.

NoClassDefFound is an error from the JVM when it cannot find a class required to run a Java program.

This error could be caused by an actual missing class, but it is usually caused by a faulty CLASSPATH.

This error also sometimes occurs when Java users add the unnecessary .class extension to the end of their command lines:NoClassDefFound NoClassDefFound

C:>java HelloWorld.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class

C:>java HelloWorld
Hello World!

Leave a Reply

Post your comments and questions below, but please follow our commenting guidelines.


Path: Home > Programming > Java > NoClassDefFound