CodeGuide supports HotSwap class replacement, a feature available in Sun J2SDK 1.4.0 and later VMs. HotSwap class replacement allows the developer to dynamically replace method implementations while the application is running. In combination with CodeGuide's incremental compiler this can lead to drastically reduced turnaround times.
J2SDK 1.4.0 or later is required for HotSwap class replacement.
HotSwap works in debug mode only.
CodeGuide's incremental compiler must be used. Ant is not supported.
HotSwap class replacements works for local debugging only. Remote debugging is not supported.
While the application is running you can make changes to any number of classes. Once you think that the changed classes should be uploaded to the VM choose Debug | HotSwap modified classes.
CodeGuide will now compile all modified classes and classes depending on those classes (if necessary). After compiling it will upload those classes to the VM. The VM will now continue execution using the new implementation. If a thread is currently executing a method which has been changed it will continue to execute the old method implementation until it returns. The new implementation will be used on subsequent method invocations. HotSwap class replacement will work even if he application is not suspended.
If HotSwap is not supported by the VM a dialog is displayed. There might be certain constraints imposed by the VM on how code may be changed using HotSwap class replacement. For example some VMs may not allow introduction of new methods using HotSwap or other schema changes (added or removed fields/methods). If CodeGuide detects that the changed classes were not accepted by the VM an error is signalled but the application continues to run.