redefine_classes
Hot-swap modified Java classes into a running JVM for live code updates during debugging. Scans a directory for changed .class files and redefines them using JDI, returning updated classes and timestamp for incremental runs.
Instructions
Hot-swap changed Java classes into a running JVM. Scans a classes directory for .class files modified after sinceTimestamp, matches them against loaded classes in the target JVM, and redefines them using JDI. Returns which classes were redefined and the newest file timestamp (pass as sinceTimestamp on next call for incremental updates). Only works with Java debug sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ||
| classesDir | Yes | Absolute path to compiled classes directory (e.g. build/classes/java/main/) | |
| sinceTimestamp | No | Unix timestamp (ms). Only redefine .class files modified after this time. 0 or omitted = all files. |