I tried attach bytebuddy agent to the old applet. In some runtime stage, that old applet receives a signed jar file from the other host and load them dynamically.
The problem is that the agent doesn't work in that dynamic loading stage. I think
that in such a case, Rafael Winterhalter told that with(ProtectionDomain)
and AgentBuilder.Transformer.ForAdvice
are just solution. But how to apply them? I tried as far as possible I can to get nothing. And there are no usecase on the web. Anyone help me.
Thank in advance.
How to attach bytebuddy agent to the dynamic class, especially, when dynamic class are loaded from signed jar file
318 Views Asked by boun At
1
A Java agent should be notified on any class loading activity. With applets, there is however a chance that a security manager blocks the instrumentation if Byte Buddy uses any privileged action without having it permitted.
When using advice, there should not be any difference wether a jar is loaded at runtime or if the application is an applet. Do you get any error message? Register an
AgentBuilder.Listener.StreamWriting.toSystemOut()
listener to debug such problems.