Hot code swap is not working, why?

半腔热情 提交于 2019-12-07 07:43:27

问题


When I'm trying to write a simple one class console app - there is no problem. I can change code in a method when debugging.

The problem is with my web apps on Jetty. It's not working nor just in usual debug mode(pressing a debug button in eclipse) nor in remote debug mode described here. I can debug but can't change even usual not static methods, like adding sysout for example, I mean I can change it but after saving it's not updated and it works the same as before.

Also, I talked to my colleagues, it works for them but they use Spring Tool Suite version of eclipse, I tried and concluded that it works in the latest version STS out of the box in usual debug mode and it doesn't work in the latest version of Eclipse.

What can be a reason?


回答1:


Answer based on my comments to the question (as suggested by OP):

Strange Eclipse behaviour can happen when your workspace or project metadata are corrupted. This can happen for example when you upgrade Eclipse version and use workspace created by the old version.

You should try to re-create your workspace and setup fresh project checkout. If the problem goes away, you know there was something fishy in the workspace metadata.




回答2:


You would have to use hot swap proxy for swapping classes in EE container like jRebel. Check it out.



来源:https://stackoverflow.com/questions/22093583/hot-code-swap-is-not-working-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!