这个问题让我纠结了好久!百度得不到一点有用的信息,后来通过谷歌解决了这个问题。在某个国外论坛看到很多人debug in eclipse的时候也出现同样的ClassNotFoundException,有人回帖给出了原因和解决方法:
I figured out that if I kept hitting continue (to go past the breakpoint) it would eventually reach my actual application. Along the way though, java was triggering ClassNotFoundExceptions for every single class referenced in my code, which was causing Eclipse to break. It turns out that these ClassNotFoundExceptions are normal behavior – they are supposed to happen for every new class, but having eclipse set a breakpoint for each one is definitely not! To solve the problem, I had to open up the breakpoint window and disable the breakpoint “ClassNotFoundException: caught and uncaught”
也就是说你断点的设置中默认总是选中ClassNotFoundException: caught and uncaught,eclipse执行的时候会查找你代码中的每个类的这个异常,最终导致执行中断。Myeclipse中怎么解决这个问题呢?打开Window->Show View->Other->BreakPoints,然后在下面BreakPoints栏中把ClassNotFoundException: caught and uncaught前面的钩去掉!下次在debug的时候就不会报ClassNotFoundException了!