NoClassDefFound error running Java application from Eclipse
Posted on 2011-02-24
I am setting up a new computer. I copied my workspace directory from my old computer to my new computer. I also copied my Eclipse directory from my old computer to my new computer. When I run a Java class from Eclipse on my new computer I get a NoClassDefFound error for the class I am running. When I do the same thing on the old computer it works fine. I installed the Java SDK from scratch on the new computer. I also have the new Java SDK in a different directory on my new computer than on my old computer. I have also tried a bunch of ways to add the directory in which the class files are into the classpath. I am putting the class files into the default "output" directory under the project's home directory. This is the default value in Eclipse. Do you have any suggestions? I don't understand why Eclipse is not finding the class files. I also verified that the class files exist under the output directory.