Questions tagged [java-attach-api]

Java Attach API is a proprietary Oracle API implemented by HotSpot and JRockit that allows to attach JVMTI agents to JVMs at runtime.

Java Attach API is a proprietary Oracle API implemented by HotSpot and JRockit that allows to attach JVMTI agents to JVMs at runtime.

Links

6 questions
8
votes
1 answer

transforming class has no effect

Based on this tutorial I try to get a java agent to work. https://www.baeldung.com/java-instrumentation#loading-a-java-agent I do get [Agent] Transforming class TestApplication I have no errors, but I can't see any effect of transforming the…
clankill3r
  • 7,935
  • 16
  • 62
  • 110
7
votes
2 answers

What interprocess communication mechanism is used by the Java Attach API?

I am trying to find out the interprocess communication mechanism used by the Java Attach API on the main operating systems, but I can't seem to find much reference to the underlying mechanism. The only mention I found was here where it refers to…
jbx
  • 18,832
  • 14
  • 73
  • 129
0
votes
0 answers

Starting Java Agent on Java Applet (jp2launcher)

I want to start a Java agent on a Java applet running on jp2launcher. I manage to attach to jp2launcher.exe using this jattach tool and I can inspect that my agent .jar file gets loaded, but neither my preMain or agentMain gets called. The same…
crankedrelic
  • 368
  • 4
  • 14
0
votes
1 answer

VirtualMachine attach throws com.sun.tools.attach.AgentLoadException: 0 when using Open JDK 10.0.2

I am facing an issue when using the com.sun.tools.attach.VirtualMachineJava API. My target application(Tomcat) is running using Oracle Hot Spot version 1.7.0_80. I am trying to connect that tomcat via dynamic attach from another Java program (on…
Ramesh Subramanian
  • 875
  • 1
  • 8
  • 25
0
votes
1 answer

Attach library DLL cannot be loaded by application

I am doing bytecode manipulation in java, but it is being done on an external, running JAR file. For this reason, I am using the attach API. My current problem is that the attach API cannot load a DLL I have in a separate folder. I have proviously…
JD9999
  • 272
  • 1
  • 8
  • 16
0
votes
1 answer

JVMTI communicate with attaching vm

I have a native JVMTI agent that I attach with the Java Attach API. The agent basically just runs Agent_OnAttach and then exists. I would like to pass information from the agent to the VM that attached the agent. Even just writing to stdout of the…
Philippe Marschall
  • 4,277
  • 1
  • 27
  • 48