why am i getting class not found exception for all the java classes i run code example
Example: 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.