JavaOne 2010: Unlimited Hotswapping for Java
At this years JavaOne, we will present an open source project that aims at bringing unlimited hotswapping capabilities to the Java HotSpot(TM) virtual machine. Our modified version of the virtual machine is capable of adding and removing fields and methods of Java classes at runtime. Additionally, it is possible to change the super type (e.g., the set of implemented interfaces or the super class). There is no performance penalty or indirection introduced in contrast to existing bytecode rewriting techniques. You can use the VM without additional tools from within the debugger of your favorite Java IDE.
The enhanced virtual machine is freely available from http://ssw.jku.at/dcevm/. You can download an installer to patch an existing Java 6 or Java 7 installation. If you are interested in technical details about our approach, you are welcome to attend my JavaOne presentation on Wednesday, September 22, 13:00 at the Hilton San Francisco, Yosemite C. A recent version of the source code is also available from the MLVM wiki pages at http://wikis.sun.com/display/mlvm/HotSwap. The project is currently sponsored by Oracle and Guidewire.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)





Comments
Jaran Nilsen replied on Tue, 2010/09/21 - 4:50am
Thomas Wuerthinger replied on Tue, 2010/09/21 - 12:22pm
in response to:
Jaran Nilsen
Alan Keefer replied on Tue, 2010/09/21 - 1:21pm
To expand on the differences with JRebel a bit further: JRebel doesn't handle inheritance hierarchy changes, while the DCEVM does (you can change supertypes, implement new interfaces, etc.). Because it's implemented within the VM rather than using classloader tricks, the DCEVM also doesn't impose any overhead on startup or during classloading, and doesn't affect stack traces or debuggers.
The DCEVM, however, won't automatically scan for class file changes like JRebel will: it relies on being told what to swap, generally via interaction with an IDE, the same way that standard Java hotswapping is kicked off (since it is standard Java hotswapping).
Jaran Nilsen replied on Wed, 2010/09/22 - 1:17am
in response to:
Alan Keefer
Hemanta Sapkota replied on Thu, 2010/09/23 - 1:38am
Kode Ninja replied on Thu, 2010/09/23 - 6:43am
Peter Rexer replied on Fri, 2010/09/24 - 1:40pm
in response to:
Kode Ninja
Thomas Wuerthinger replied on Fri, 2010/09/24 - 11:57pm
Spentmoretime M... replied on Sun, 2010/09/26 - 10:07pm
Tire Works replied on Thu, 2011/08/04 - 8:23am
Kyle Thomas replied on Sun, 2011/10/09 - 4:49am