I'd try to delete the old run configuration: from the menu select Run > Run Configurations, find your config on the left hand side, select it and click the delete button above it, finally re-run your application.
After changing package name I get java.lang.ClassNotFoundException on Eclipse
Pergunta
I started a small Java project on Eclipse with two classes that are in the (default package). Everything is working fine but when I tried to create a new package (let's say net.server) with the same two classes (with the package name statement in each one) I get:
Exception in thread "main" java.lang.ClassNotFoundException: MyClassName
I'm not experienced with Java and Eclipse and I have no idea what is causing this.
Solução
Outras dicas
You probably didn't update your imports in your main file (the one who runs the main
method). ClassNotFoundException
implies that the classloader couldn't find a certain class given the current directives.
Eclipse should be sending you a warning about this (underlining the offending imports in red). To organize the imports for a given file directly, use the Ctrl
+ Shift
+ O
shortcut while editing it.
Oh, and I hope your src folder is a source folder, and not a regular one.