The question is. There is a file Lib.jar and there is JNILib.dll .

It is necessary that after loading Lib.jar was loaded and it changed the a.test.Class class from Lib.jar before it started using the JVM.

How to do it? I know how to load a dll, I mean, what functions from JNI do I need to use?

PS Agents do not fit, JNI is required.

  • Yes, what exactly is not clear? - AGrief
  • @AGrief, you can explain this point: changed the a.test.Class class from Lib.jar before it started using JVM - XIII-th
  • You can write a classloader that will load Lib.jar and in the boot process will perform a transformation, the transformation logic will be rendered in JNILib.dll . (if I understood the task correctly) - Nofate

0