Java Exception in thread main - ClassNotFoundException

Kenoja

New Member
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".\[code\]Exception in thread "main" java.lang.NoClassDefFoundError: MyClassCaused 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\]My java file:\[code\]public class MyClass { public static void main(String[] args) { System.out.println("Test"); }}\[/code\]I don't see any mistakes in my source code. What is going on?
 
Back
Top