JVM Tools — the practical directory for working Java developers

The independent, constantly-updated reference for JVM tooling: command-line diagnostics, profilers, memory & GC analysis, bytecode, build and testing tools — with real examples, not just links.

Explore by category

12 tools

JVM CLI

Every JDK ships with a set of diagnostic and management command-line tools that live inside the bin/ directory. Because they travel with the runtime, they are the first tools you should reach for when a Java process misbehaves: they cost nothing, require no agent or instrumentation, and work almost everywhere.

8 tools

Profiling

When a Java service is slow, a profiler tells you where the CPU time and allocations actually go instead of wherever a hunch points. Modern JVM profiling has largely converged on two complementary techniques: sampled async profiling (async-profiler) and events recorded by the JVM itself (Java Flight Recorder).

6 tools

Memory

OutOfMemoryError reports, growing heap graphs in your monitoring, and slowly-rotting response times are usually signs one of two things: a leak, or excessive garbage-collection pressure. The tools in this category are how you turn those symptoms into an exact cause.

8 tools

Bytecode

The Java bytecode format (class files) is a stable, documented target. Because the JVM executes bytecode rather than source, any JVM language can compile to it, and runtime libraries can generate or transform classes after compilation. This is what powers proxies, ORMs, mocking frameworks and most modern frameworks' cleverness.

6 tools

Build

A modern JVM project is built by one of a small set of tools: Maven and Gradle dominate, with sbt and Bazel in specific niches. All of them orchestrate compilation, testing, packaging and dependency resolution against repositories such as Maven Central.

8 tools

Testing

Test-driven code on the JVM rests on a durable core of tooling: a test framework (JUnit 5 or TestNG), an assertion library (AssertJ), and a mocking library (Mockito). Around that core, Testcontainers lets you spin up real infrastructure for integration tests, and JMH is the only sane way to microbenchmark code on a modern JIT-compiled JVM.

5 tools

Kubernetes

Running Java in Kubernetes changes how you think about JVM settings. The JVM no longer sees a fixed machine — it sees the CPU and memory limits you place on the pod, and it must cope with cgroup capping, container sharding and the container's ephemeral nature. Get the memory settings wrong and you get either OOMKilled pods or heap starvation.

Guides & deep-dives

Practical how-tos

Guide

JVM Flags: The Practical Tuning Guide

Understand and tune JVM flags: heap sizing (-Xmx/-Xms), default -XX settings, GC and JFR flags, how to inspect and mutate flags with jinfo and jcmd.

Guide

Heap Dump Analysis: From OutOfMemoryError to Root Cause

Step-by-step heap dump analysis: capture with jmap/jcmd, enable -XX:+HeapDumpOnOutOfMemoryError, open in Eclipse MAT, and use OQL to find leaks.

Guide

Thread Dump Analysis: Diagnose Hangs and Deadlocks

Read Java thread dumps to find hangs, deadlocks and blocked threads: capture with jstack/jcmd, identify thread states, and spot the culprit stack.

Deep-dive

jcmd

jcmd examples and reference: list commands, capture heap and thread dumps, start and stop Java Flight Recorder, force GC and inspect flags.

Deep-dive

async-profiler

async-profiler tutorial: install, profile CPU and allocations, dump flame graphs, convert to JFR, and use it inside IntelliJ IDEA on any JVM.

Deep-dive

Eclipse MAT

Eclipse MAT tutorial: load a heap dump, run the Leak Suspects report, use the Dominator Tree and OQL, and find what holds objects to GC roots.

Don't install a tool until you need it

Most JVM diagnosis starts with tools already on your path. jcmd, jstat, jmap and jstack ship with every JDK. The trick is knowing which question you are asking:

Quick picks: the tools most teams reach for

jcmd

Sends diagnostic commands to a running JVM: heap dumps, thread dumps, JFR start/stop, GC.run, VM.system_properties and hundreds of others.

async-profiler

The de-facto standard sampled profiler: low-overhead CPU and allocation profiling with flame graphs, usable directly or inside IntelliJ and your JFR workflow.

Eclipse MAT

The standard heap-dump analyzer: leaks suspect report, dominator tree, OQL queries, and path-to-gc-roots to pinpoint what's holding onto memory.

java -XX:StartFlightRecording / jfr

Java Flight Recorder: records profiling events (CPU, allocations, GC, locks, exceptions) with low overhead; `jfr` reads and prints .jfr recordings after the fact.

VisualVM

The bundled-style visual tool for profiling and monitoring local and remote JVMs: CPU/memory sampling, thread and heap dump viewing, and JFR/GC analysis.

JMH (Java Microbenchmark Harness)

OpenJDK's harness for writing correct microbenchmarks — it deals with warm-up, dead-code elimination and JIT effects so your numbers mean something.

Apache Maven

The longest-standing dominant build tool: convention-driven lifecycle, XML POMs, and a massive ecosystem of plugins; the default in most enterprises.

Byte Buddy

A high-level runtime class-generation library with a fluent API; the easiest way to create dynamic proxies, agents, and generated types without writing assembly.