A free Java code coverage library that measures which parts of Java bytecode are exercised by tests.
alibaba/jvm-sandbox
A JVM sandbox container that adds non-invasive, runtime AOP to running Java applications without restarting them.
- Stars
- 6,953
- Forks
- 1,586
- Open issues
- 49
- Last commit
- 2 months ago
What is it?
JVM-SANDBOX is an AOP framework container for Java that attaches to a running JVM and enhances target methods at runtime. Target applications do not need to be restarted or modified, and modules can be loaded and unloaded on the fly without leaving traces in the application.
It works by splitting each method call into BEFORE, RETURN and THROWS stages, letting plugin modules read or change arguments, return values and exceptions, or short-circuit method execution. Sandbox and modules run under their own class loaders, so they do not conflict with the application's classes. The project is built on Instrumentation and supports JDK 6 through 11.
Typical uses include online fault diagnosis, dynamic logging, fault injection, request recording and replay, traffic control, and sensitive data monitoring or masking.
Key features
- 01Attaches to a running JVM without restarting or modifying the target application.
- 02Lets modules read or change method arguments, return values and exceptions.
- 03Isolates sandbox and modules from application classes via custom class loaders.
- 04Modules can be hot-loaded and unloaded cleanly.
- 05Supports multiple tenants, each with independently controlled sandboxes.
- 06Runs on JDK 6 through 11.
Use cases
- Diagnosing production issues by adding dynamic logs to methods without redeploying.
- Injecting faults into methods to test how a system handles errors.
- Recording method calls and replaying their results for testing.
- Monitoring or masking sensitive data passing through application methods.
Quick start
- 1
Download the latest release zip (the README notes this OSS link may expire)
wget https://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/sandbox-1.3.3-bin.zip - 2
Or build the distribution yourself with JDK 1.8 on Linux or macOS
cd bin && ./sandbox-package.sh - 3
Attach the sandbox to a running Java process (replace 33342 with your process ID)
./sandbox.sh -p 33342
Things to know
- The README states support for JDK 6 to 11 only.
- Building from source requires JDK 1.8 and Linux, macOS or Unix; Windows is not supported for building.
- Licensed under LGPL-3.0, a copyleft license.
In collections
Topics
FAQ
- What is jvm-sandbox?
- A JVM sandbox container that adds non-invasive, runtime AOP to running Java applications without restarting them. JVM-SANDBOX is an AOP framework container for Java that attaches to a running JVM and enhances target methods at runtime. Target applications do not need to be restarted or modified, and modules can be loaded and unloaded on the fly without leaving traces in the application.
- Is jvm-sandbox free to use? What license does it have?
- jvm-sandbox is open source under the LGPL-3.0 license. Check the license terms before using it in commercial products.
- Is jvm-sandbox still maintained?
- Updated within 6 months. The last commit to jvm-sandbox was on Sep 9, 2026.
- What can I use jvm-sandbox for?
- Diagnosing production issues by adding dynamic logs to methods without redeploying. Injecting faults into methods to test how a system handles errors. Recording method calls and replaying their results for testing. Monitoring or masking sensitive data passing through application methods.
- How do I install jvm-sandbox?
- Download the latest release zip (the README notes this OSS link may expire): wget https://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/sandbox-1.3.3-bin.zip Or build the distribution yourself with JDK 1.8 on Linux or macOS: cd bin && ./sandbox-package.sh Attach the sandbox to a running Java process (replace 33342 with your process ID): ./sandbox.sh -p 33342
- Where can I get jvm-sandbox?
- The source code and installation instructions are on GitHub: https://github.com/alibaba/jvm-sandbox
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A high-performance Java APM tool that collects method and JVM metrics via a Java agent, with no changes to application code.
A bytecode viewer and editor for Java class files, plus a Kotlin Multiplatform library for reading and writing them.
The official Python client library for exposing application metrics in the Prometheus monitoring format.
A compile-time OpenTelemetry instrumentation tool for Go that adds tracing and metrics via an `otel go build` prefix, without changing application code.
A Python framework for designing, developing and evaluating autonomous AIOps agents on simulated microservice cloud environments with fault injection.