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 bytecode of the loaded classes, to alter them. They can be used to do the following:
- 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 JRebel and XRebel products 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 ...