Using ArthasHotSwap for Fast Hot Updates in Java Backend Development
This article introduces the ArthasHotSwap plugin, explains why hot‑updating a few Java classes in a test environment can save minutes compared to full redeployment, and provides step‑by‑step instructions—including downloading, compiling, uploading bytecode to OSS, and applying the changes on the server—complete with code snippets and screenshots.
We share a very useful hot‑update plugin called ArthasHotSwap (GitHub: https://github.com/xxxtai/ArthasHotSwap) that allows developers to modify Java classes on the fly without a full redeployment.
When developing and debugging in a test environment, it is common to need hot‑updates for a few files. For example, changing a name from "Zhang San" to "Li Si" would normally require rebuilding and redeploying the whole application, which can take several minutes.
Using ArthasHotSwap , the process becomes simple: download the plugin, modify the source code, compile it to obtain the updated .class files, and then invoke the plugin.
The plugin uploads the modified bytecode to an OSS bucket; the target server downloads the bytecode and applies the hot update automatically. If you need to customize the object storage, refer to the author's GitHub issue for guidance.
After applying the plugin on the server and pasting the updated files, the changes take effect instantly. The following screenshots illustrate the process and the successful result:
Finally, we can see that the modification succeeded; the whole process took less than ten seconds, making it an efficiency‑boosting tool for backend developers.
Architecture Digest
Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.