title: Java Exception in thread main - ClassNotFoundException
body: <p>I'm working with another system library in Eclipse. One time, the library got somehow removed and eclipse showed a red "!" next to the projects folder icon. I re-imported the library, but there is still the red "!". Once I try to compile and run a program, it gives me a "ClassNotFoundException".</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: MyClass
  Caused by: java.lang.ClassNotFoundException: MyClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  </code></pre>
  
  <p>My java file:</p>
  
  <pre><code>public class MyClass {
  
      public static void main(String[] args) {
          System.out.println("Test");
      }
  
  }
  </code></pre>
  
  <p>I don't see any mistakes in my source code. What is going on?</p>