views:

338

answers:

2

Why might simple changes to code fail to update? The 'hot code replace' message appears as usual when making big changes, but changing a println string, or commenting out a method call sometimes does nothing, and the app has to be restarted to apply the change. I think it may have something to do with native calls, but other than that there seems no pattern to it.

+1  A: 

Hot code replace does not allow you to change a class signature. That means, no attribute changes, no adding or removing methods, etc.

What you are allowed to do is to change a method's implementation.

Stephen Eilert
Yes, changing those produces the "hot code replace" message I described. The problem is with changes being ignored even when the message does *not* come up.
mk
Accepted since this is probably what is happening for others: if you mess with class code/defs (as opposed to method code), you get a box that tells you to restart etc. However, sometimes even simple method code changes get ignored, silently, when they are the only changes. I still have no idea why.
mk
+2  A: 

If you are not introducing changes that affect the class signature as Stephen mentioned, it should work. If it's not working, makesure that you have enabled 'Build Automatically' for the project (Project -> Build Automatically).

This is required for Eclipse to perform local builds when you do changes and push those to the server when you make a change.

Yohan Liyanage
Good point - the behavior I described is consistent with this, but this was not the issue.
mk