A Java agent is a Java program that is loaded by the Java runtime in a special way and can be used to interfere with the byte code of the loaded classes, altering them. They can be used to:
- List or log, and report the loaded classes during runtime, as they are loaded
- Modify the classes so that the methods will contain extra code to report runtime behavior
- Support debuggers to alter the content of a class as the developer modifies the source code
This technology is used in, for example, the products JRebel and XRebel from https://zeroturnaround.com/.
Although Java agents work in the deep details of Java, they are not magic. They are a bit complex and you need a deep understanding of Java, but anyone who can program in Java can ...