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

查看:28
本文介绍了“热代码替换"不起作用——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 目标 war:exploded 构建项目,然后使用 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?

推荐答案

我没有使用 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

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

在远程模式下调试应用程序时,不能更改代码,但可以更改参数值.(我认为)

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天全站免登陆