java.lang.classnotfoundexception didn't find class code example

Example 1: java class not found exception

Your classpath is broken (which is a very common problem in the Java world).

Depending on how you start your application, you need to revise the argument to -cp, your Class-Path entry in MANIFEST.MF or your disk layout.

Example 2: eclipse Error: Could not find or load main class main java.lang.ClassNotFoundException

// Run configurations -> Run -> Run configurations
// In the Classpath tab select "Advanced"
// Add where Eclipse usually put the *.class for the projects, which is (usually) "bin".

Tags:

Java Example