I can successfully attach many other agents at runtime using ByteBuddyAgent (byte-buddy-agent), but for some reason JRebel fails.
Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library: _Agent_OnAttach@12 is not available in C:\JRebel\lib\jrebel64.dll
at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:126)
Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library: _Agent_OnAttach@12 is not available in C:\JRebel\lib\jrebel64.dll
at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:94)
at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgentPath(HotSpotVirtualMachine.java:128)
... 11 more
Is there any way I can get around this? Because I'd like to attach JRebel only after certain initialization steps occur in my program.
I assume that Byte Buddy loads classes that JRebel expects to be unloaded. This might not be possible. Get in touch with JRebel to see if they can extract a more helpful error message to possibly resolve this.