Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jattach

> 编程语言
Open source

JVM Dynamic Attach utility

1.1K stars0 likes3 views
WebsiteGitHub

About

JVM Dynamic Attach utility

jattach

JVM Dynamic Attach utility

The utility to send commands to a JVM process via Dynamic Attach mechanism.

All-in-one jmap + jstack + jcmd + jinfo functionality in a single tiny program.
No installed JDK required, works with just JRE. Supports Linux containers.

This is the lightweight native version of HotSpot Attach API
https://docs.oracle.com/javase/8/docs/jdk/api/attach/spec/

Supported commands:

  • load : load agent library
  • properties : print system properties
  • agentProperties : print agent properties
  • datadump : show heap and thread summary
  • threaddump : dump all stack traces (like jstack)
  • dumpheap : dump heap (like jmap)
  • inspectheap : heap histogram (like jmap -histo)
  • setflag : modify manageable VM flag
  • printflag : print VM flag
  • jcmd : execute jcmd command

Download

Binaries are available on the Releases page.

On some platforms, you can also install jattach with a package manager.

Examples

Load native agent

$ jattach  load  { true | false } [ options ]

Where true means that the path is absolute, false -- the path is relative.

options are passed to the agent.

Load Java agent

Java agents are loaded by the special built-in native agent named instrument, which takes .jar path and its arguments as a single options string.

$ jattach  load instrument false "javaagent.jar=arguments"

List available jcmd commands

$ jattach  jcmd help -all

Installation

Debian, Ubuntu

On Debian and Ubuntu, you can install jattach from the official repository:

# apt install jattach

Alpine Linux

On Alpine Linux, you can install jattach package from the edge/community repository:

# apk add --no-cache jattach --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/

Archlinux

jattach package can be installed from AUR using one of AUR helpers, e.g., yay:

# yay -S jattach

FreeBSD

On FreeBSD, you can use the following command to install jattach:

# pkg install jattach

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言