Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/pl/halun/demo/attach/api
.gitignore
LICENSE
README.md
pom.xml

README.md

Attach API Agent Loader

This application uses Attach API to load a Java Agent into a running Java Virtual Machine with a provided process id.

Prerequisites

  • System variable JAVA_HOME set to JDK directory

Execution

Discover the process id of the running virtual machine:

jps

Example output:

$ jps
10160
7832 jar
3356 Jps

Load the Java agent:

java -classpath $JAVA_HOME/lib/tools.jar:attach-api-agent-loader.jar -Djava.library.path=$JAVA_HOME/jre/bin pl.halun.demo.attach.api.AgentLoader 7832 agent.jar
You can’t perform that action at this time.