whatisgithub

What is jvm-sandbox?

alibaba/jvm-sandbox — explained in plain English

Analysis updated 2026-06-24

6,953JavaAudience · developerComplexity · 4/5Setup · moderate

In one sentence

JVM-Sandbox is an Alibaba tool that attaches to a running Java application and lets you intercept, inspect, and modify method calls in real time without stopping the process or changing any source code.

Mindmap

mindmap
  root((JVM-Sandbox))
    What it does
      Attach to live JVM
      Intercept methods
      No source changes
    Tech Stack
      Java
      JDK 6 to 11
      Linux or macOS
      HTTP management
    Use Cases
      Live logging
      Fault injection
      Call recording
    Design
      Isolated classloaders
      Attach and detach cleanly
      Multiple instances
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add logging to a production Java application without deploying new code or restarting the service.

USE CASE 2

Simulate database or network failures in a live system to test how your application handles those faults.

USE CASE 3

Record Java method calls and replay them in a test environment to reproduce intermittent production bugs.

USE CASE 4

Monitor security-sensitive method calls in a running service by attaching a sandbox module without modifying the application.

What is it built with?

JavaJDKLinuxmacOS

How does it compare?

alibaba/jvm-sandboxloks666/get_jobsdroidpluginteam/droidplugin
Stars6,9536,9546,973
LanguageJavaJavaJava
Setup difficultymoderatemoderatehard
Complexity4/53/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Supports JDK 6, 11 only, Linux or macOS required, Windows has known path-handling issues in the test suite.

So what is it?

JVM-Sandbox is an Alibaba tool that lets developers observe and modify the behavior of a running Java application without stopping it or changing its source code. The name references the idea of an isolated container that can be attached to and detached from a live program cleanly, leaving no trace when removed. The core capability is intercepting Java method calls at three points: just before the method runs, when it finishes normally, and when it throws an error. Plugins built on top of the framework can inspect and modify the inputs and outputs at each of those points. This makes it possible to add logging to a running system, simulate faults for testing, record method calls and replay them later, or monitor security-sensitive operations, all without modifying the original application. A key design goal is isolation. The sandbox and any modules you load into it are kept in separate class-loading containers, so there is no risk that the sandbox's own code will conflict with the application's code. Multiple independent sandbox instances can be attached to the same running process simultaneously. When you detach the sandbox, everything it added is cleanly removed. To use it, you download the package, run a shell script pointing it at the process ID of your running Java application, and it attaches. From that point you can load and unload modules, which are small plugins that implement the actual interception logic. The framework exposes an HTTP interface for management while attached. The README is written primarily in Chinese and is oriented toward Java engineers building diagnostic tools or testing infrastructure. It targets Java applications running on JDK 6 through JDK 11. Installation requires Linux or macOS, Windows is not fully supported due to some path-handling differences in the test suite.

Copy-paste prompts

Prompt 1
Attach JVM-Sandbox to a running Spring Boot application and write a module that logs every call to a specific service method with its arguments and return value.
Prompt 2
Use JVM-Sandbox to inject a simulated exception into a database connection method to test how my application handles a database outage without stopping it.
Prompt 3
Build a JVM-Sandbox module that records all calls to a payment processing method and replays them in a staging environment for debugging.
Prompt 4
Attach JVM-Sandbox to a JDK 11 process and create a module that measures the latency of every outbound HTTP call and logs slow ones.
Prompt 5
How does JVM-Sandbox's class-loading isolation work and how do I load two independent modules into the same running Java process without conflicts?

Frequently asked questions

What is jvm-sandbox?

JVM-Sandbox is an Alibaba tool that attaches to a running Java application and lets you intercept, inspect, and modify method calls in real time without stopping the process or changing any source code.

What language is jvm-sandbox written in?

Mainly Java. The stack also includes Java, JDK, Linux.

How hard is jvm-sandbox to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is jvm-sandbox for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.