JavaTraceExtractor is a dynamic analysis tool designed to extract Java execution traces and call stacks directly from a running Java Virtual Machine (JVM) into a text-based file.
Provide ability to extract java traces compatible with FamixJavaTrace enabling their analysis within the Moose software analysis platform by generating a dedicated meta-model.
It was first created to provide a parser for Java call stacks, Support dropped since v1.0.0.
For More information about this meta-model see the FamixCallStack project.
Critical Limit: This tool requires Java 8 or below to run. However, it can attach to and analyze target applications running on any Java version.
A detailed step-by-step guide is available: Download & Import Tutorial
There are two ways to do this:
- Open a terminal at the root of the project and execute:
mvn clean install - Right-click on the project in Eclipse:
- Navigate to Maven > Update Project...
- Ensure your project is selected and click OK to force the update and resolve dependencies.
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006
In Eclipse, open the Run Configurations for your target application and paste this string into the Arguments > VM Arguments section:

This command enables debug mode on the Java VM:
- jdwp: Java Debug Wire Protocol
- transport=dt_socket: Enables socket-based communication
- server=y: Starts the JVM in debug server mode (waits for a debugger)
- suspend=y: JVM execution is paused until a debugger connects
- address=5006: Port used to wait for debugger connection
Select an extractor from the jdiextractor.launcher package based on your performance and accuracy needs:
| Extractor | Type | Performance | Output / Behavior | Default Config File |
|---|---|---|---|---|
SnapshotCSExtractorLauncher |
Call stack | Fast | Object states captured only at the very end | configCSSnapshot.json |
HistoryCSExtractorLauncher |
Call stack | Slow | Historically accurate | configCSHistory.json |
TraceExtractorStepLauncher |
Execution trace | Slow & Heavy | Traces all method calls | configTrace.json |
Edit your chosen .json file to match your project's structure. By default, the extractor automatically uses the configuration file linked to its algorithm.
Tip: You can maintain multiple configurations by passing a custom file path as an argument to the extractor, preventing default overrides.
Refer to config.md for detailed configuration instructions.
Run the selected launcher to begin extraction.