Hotswap Agent - Java runtime class and resource redefinition
I am the author of Hotswap Agent project. Because of allocation on commercial projects, I have not been as active as I wish on the project lately, but there are still active contributors and we have finally reached (stable) version 1.0. If you are a Java developer, give it a try!
The main purpose of Hotswap Agent project is to avoid infamous change ->restart + wait-> check development lifecycle. Save&Reload during development should be standard and many other languages (including C#) contain this feature.
Features
In contrast to standard Java, where the hotswap is limited to in-body code changes, the DCEVM + HotswapAgent allow following code changes:
- Add/remove/modify class fields.
- Add/remove/modify methods. Add/remove/modify method annotations
- Add/remove/modify classes including inner classes. HotswapAgent handless correct inner class redefinitions.
- Add/remove static member of classes. HotswapAgent handles static member initialization.
- Add/remove enum values
- Refresh framework and application server settings
The only unsupported operation is hierarchy change (change the superclass or remove an interface).
DCEVM realizes hotswap on JVM level. HotwapAgent does the same on level of Java frameworks and servlet containers. Both projects used together forms excellent combination for daily development not only in Java but also in another JVM languages.
For more information visit https://hotswapagent.org/.
Principal Solution Architect at AT&T | Data Science Graduate Student at University of Notre Dame
7 年Hi, Not all the features are working as expected. I have been testing latest versions of DCEVM, hotswap agent with tomcat and JBOSS. Here are the features which havent worked:- 1. Declaring and initializing a non-final class field. Field is getting picked up but doesn't initialize to the set value. Field gets initialized to default value. But if declare and initialize a final class field, it works fine. 2. Creating a regular class or an inner class