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

7 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
  • 9,146
  • 20
  • 70
  • 126
8
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
  • 21,365
  • 18
  • 90
  • 144
0
votes
0 answers

Get SWT classes via reflection running from a java agent

I have developed a Java agent which uses the Attach API to attach to Eclipse. I want to use reflection so I can get the UI Thread and dispatch some calls. The problem is I can't get the org.eclipse.swt.Display class through reflection. I get the…
crankedrelic
  • 463
  • 1
  • 5
  • 14
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
  • 463
  • 1
  • 5
  • 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
  • 944
  • 1
  • 12
  • 28
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
  • 394
  • 1
  • 7
  • 18
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,452
  • 1
  • 34
  • 52