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!

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
Follow Will.Spencer on

Leave a Reply

Related Posts

  • How to Check the Java Version

    There are two ways to check the Java version. Both ways are outlined below. Check the Java Version from the Command Line To check the JRE version that is running, use the `java -version` command. C:>java -version java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed [...]...


  • Java Source Code

    Java source code is code that you write in the Java programming language. Java source code is converted to Java bytecode by the Java compiler. Java source code files usually have the .java extension. Sun recommends that Java source code files be no longer than two thousand lines. Larger source code files should be split [...]...


  • Java vs. C++

    C++ supports pointers; Java does not (Java does have object references) C++ supports mutiple inheritance directly; Java supports multiple inheritance only through interfaces C++ supports operator overloading; Java does not C++ supports global variables; Java does not (sort of) C++ supports #define; Java does not C++ supports typedef; Java does not C++ supports enum; Java [...]...


  • Uninstall Java

    Java is created to operate in the distributed environment on the net. It is much easier to use compared to C++. Java functions are based on the object-oriented programming model. You can use it for online video, audio, games, banking applications and chat. It is also used in various intranet applications. Microsoft Java was first [...]...


  • Java Servlet

    A Java servlet is a Java program which is run on a web server. A Java servlet is much like a Java applet, except that servlets are run on the web server instead of being downloaded to the web client....