Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 774 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 774 Bytes

Jvm Attach

Jvm Attach make it easy to execute operations into remote running Java Virtual Machines from Java code, zero C/C++ needed.

Features

  • Attach shared library agent
  • Attach jar JavaAgent
  • All other features supported by jattach

Usage

compile("com.mageddo.jvmattach:jvm-attach:1.0.0");
public class Main {
  public static void main(String[] args) {
    JvmAttach.loadJar(JvmAttach.getCurrentPid(), Main.class.getResourceAsStream("/simple-agent.jar"));
    // simple agent loaded: null
  }
}

See unit tests for more examples

Requirements

  • HotSpot JRE 8+, OpenJ9 JVMs are not supported, no JDK needed