03 Jun 2020 10:00 AM
Oracle Java supports 2 ways of instrumenting JVM processes:
- via CLI specifying -javaagent:jarpath,
- starting agents after the JVM startup.
Which method does OneAgent use and why?
Why is it not possible to do Java code injection on the fly without java process restart?
See details:
https://docs.oracle.com/javase/7/docs/api/java/lang/instrument/package-summary.html
Solved! Go to Solution.
03 Jun 2020 02:09 PM
AFAIK OneAgent uses JVMTI to instrument the JVM itself. But there is also a native part of oneagent (library written in C++) linked to your JVM process. I don't think you can add any library with such functionality on the fly to any process.