I\'ve tried both the example in Oracle\'s Java Tutorials. They both compile fine, but at run-time, both come up with this error:
Exception in thread \"main\"
One source of error for this exception could stem from inconsistent definitions for Proguard, e.g. a missing
-libraryJars "path.to.a.missing.jar.library".
This explains why compilation and running works fine, given that the jar is there, while clean & build fails. Remember to define newly added jar libraries in proguard setup!
Note that error messages from Proguard are really not up to standard, as they are easily confused with similar ant messages arriving when the jar is not there at all. Only at the very bottom will there be a small hint of proguard in trouble. Hence, it is quite logic to start searching for traditional classpath errors etc, but this will be in vain.
Evidently, the NoClassDefFound exception will be the results when running e.g. the resulting executable jar built and based on a lack of proguard consistency. Some call it proguard "Hell"