How to send results from agent to java application
Hello
I have been working on a java agent using JVMTI. The next thing that I would like to do is instead of having the output sent to stdout, I would like to have it sent to a java application.
I have been going through Sheng Liang抯 book on JNI, and have seen that to call a java method you need a reference to a jobect. This is where I have become stuck.
So far, what I have done is in a java application, I have a native method called initialize. The first thing my java application does is call this. Then, in my native implementation of initialize, I save the reference of the jobject that is passed along. I then use Runtime.getRuntime ?. to execute a bat file that executes java application with my agent. This doesn抰 seem to be working!!!
Are there any other ways I can approach this?
Thanks
Sajid

