Eclipse Debugging Error: ClassNotFoundException的解决方法(很有用)

Eclipse Debugging Error: ClassNotFoundException的解决办法
用eclipse的时候,遇到一个问题,每次debug的时候,都会第一个弹出这个exception

把ClassNotFoundException:caught and uncaught前面的勾去掉就OK了。

reference:

I just hit a really annoying (sort of) bug in Eclipse. I could not debug any of my projects because they immediately stopped with a call stack like the following:

terrain.TerrainApp at localhost:49827   
    Thread [main] (Suspended (exception ClassNotFoundException))   
        ClassLoader.findBootstrapClass(String) line: not available [native method]   
        Launcher$ExtClassLoader(ClassLoader).findBootstrapClass0(String) line: not available   
        Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available   
        Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available   
        Launcher$AppClassLoader.loadClass(String, boolean) line: not available   
        Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available   
        Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: not availableI found people with similar issues on various message boards, but no solutions.

Then 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 C 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”  ― I have no idea how this breakpoint got set in the first place, I certainly didn’t do it!

So now I can finally debug my programs without relying on tons of print statements… that should help my progress.

今天在做项目的时候,发现项目在
Run as --> Run on server 的时候能正常运行 而在
Debug as -->Debug on server 的时候却不能正在运行 出现类似以上的异常
但是项目的部署 没有错误  而报出异常ClassNotFoundException,
本来使得正常跑 在断点处查看问题,结果一连串的异常处理
解决的办法是:
在 Window -->show view --> Breakpoints 里面
ClassNotFoundException:caught and uncaught前面的勾去掉就OK了

之后 debug模式 正常运行 运行 停止在断点处..
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值