“热代码替换”不起作用 - Eclipse不会更改JBoss上的任何代码 [英] 'Hot code replace' not working -- Eclipse doesn't change any code on JBoss

查看:174
本文介绍了“热代码替换”不起作用 - Eclipse不会更改JBoss上的任何代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前遇到热代码替换在Eclipse Galileo和JBoss 4.2.3上无法使用的问题。

I'm currently experiencing a problem with 'hot code replace' not working on Eclipse Galileo and JBoss 4.2.3.

其他应用程序中,我正在运行在我的本地JBoss上展开了Java WAR。由它构建的项目由Maven管理。我使用Maven目标战争构建项目:爆炸,然后我将该目录复制到具有ANT脚本的JBoss。

Among other applications I'm running an exploded Java WAR on my local JBoss. The project from which it is build is managed by Maven. I build the project using the Maven goal war:exploded and then I copy that directory to JBoss with an ANT script.

当我正在运行应用程序并设置断点在代码的任何位置,Eclipse在调试模式下正确停止该行。
但是当我对源文件进行更改并保存时,Eclipse不会将此更改应用于JBoss。
例如,当我将一个正常的代码行放入一个注释中时,调试器仍然会像这样是常规的Java代码,而不是这个注释。或者当我删除一行,调试器似乎与文件不同步,并开始逐步加括号。

When I'm now running the application and set a breakpoint anywhere in the code, Eclipse properly halts at that line in the debug mode. But when I'm making a change to the source file and save it, Eclipse doesn't apply this change to the JBoss. For example, when I make a normal code line into a comment, the debugger still steps over this comment as if it was regular Java code. Or when I remove a line, the debugger seems to get out of sync with the file and starts stepping over parenthesis.

但是我没有得到任何热代码替换错误消息。在我看来,Eclipse将更改应用于源文件,但不适用于JBoss。

But I'm not getting any 'hot code replace error'-messages either. It seems to me that Eclipse applies the changes to the source files, but doesn't apply it to the JBoss.

是否有任何特殊偏好必须打开为了使代码更换代码工作?或者我将如何构建和部署应用程序到JBoss上有任何错误?

Are there any special preferences that have to be turned on in order to make hot code replace work? Or are there any mistakes in how I build and deploy the application to the JBoss?

非常感谢您的帮助。

谢谢
Bernhard V

Thank you. Bernhard V

推荐答案

我没有使用JBoss,但我有两个建议。

I did not work with JBoss but i have two suggestions.

1)
如果您使用启动配置在eclipse中运行应用程序

1) If you run your application in eclipse using the launch configuration

您的项目 - 自动构建启用了标志?
如果没有,代码不会被编译和忽略t运行时。

Is your "Project" - "Build Automatically" flag enabled? If not, the code is not compiled and ignored t runtime.

2)
当您以远程模式调试应用程序时,您不能更改代码,但可以更改参数的值。 (我想)

2) When you debug an application in remote mode, you can not change the code, but you can change the value of parameters. (i think)

这篇关于“热代码替换”不起作用 - Eclipse不会更改JBoss上的任何代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆