java-agent-bootstrap

A Java Agent for injecting threads into running JVMs

License

License

Categories

Categories

Java Languages
GroupId

GroupId

org.pidster
ArtifactId

ArtifactId

java-agent-bootstrap
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

java-agent-bootstrap
A Java Agent for injecting threads into running JVMs
Project URL

Project URL

http://pidster.org
Source Code Management

Source Code Management

https://github.com/pidster-dot-org/java-agent-bootstrap

Download java-agent-bootstrap

How to add to project

<!-- https://jarcasting.com/artifacts/org.pidster/java-agent-bootstrap/ -->
<dependency>
    <groupId>org.pidster</groupId>
    <artifactId>java-agent-bootstrap</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.pidster/java-agent-bootstrap/
implementation 'org.pidster:java-agent-bootstrap:0.2'
// https://jarcasting.com/artifacts/org.pidster/java-agent-bootstrap/
implementation ("org.pidster:java-agent-bootstrap:0.2")
'org.pidster:java-agent-bootstrap:jar:0.2'
<dependency org="org.pidster" name="java-agent-bootstrap" rev="0.2">
  <artifact name="java-agent-bootstrap" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.pidster', module='java-agent-bootstrap', version='0.2')
)
libraryDependencies += "org.pidster" % "java-agent-bootstrap" % "0.2"
[org.pidster/java-agent-bootstrap "0.2"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Generic Java Agent

This project provides a generic Java Agent.

The Attach API can be used to connect to the running JVM process and launch the agent, or the standard mechanism for specifying a Java Agent can be used.

The agent will start a configurable, specific thread instance inside the running JVM. This is useful for attaching monitoring components to an existing Java process.

The parameters passed to the agent include:

  • 'libs', specifies the directory containing JAR files
  • 'thread', specifies the thread class name to be injected and started.

Build Instructions

The build uses Gradle which means you don't have to do much, just run:

./gradlew clean build

HowTo

A script is available after a build as an example of how to use the application.

java-agent-bootstrap-0.1/inject <pid> -javaagent=java-agent-bootstrap-0.1.jar=libs=/full/path/to/libs,thread=org.example.MyThread
org.pidster

Pidster.org

Versions

Version
0.2
0.1