Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:416rehman DeepZero JDK

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Reverse_Engineering
Last Updated 2026-10-27 00:00 GMT

Overview

JDK 17+ runtime providing the JVM that Ghidra's `analyzeHeadless` requires for binary decompilation.

Description

This environment provides the Java Development Kit required by Ghidra. The `GhidraDecompile` processor sets `JAVA_HOME` in the child process environment (from its `java_home` config field or the `JAVA_HOME` environment variable) so the headless analyzer launches with a compatible JDK. CI uses Eclipse Temurin JDK 17. The JDK is a prerequisite for the Environment:416rehman_DeepZero_Ghidra environment — Ghidra cannot run without a JVM.

Usage

Use this environment alongside Environment:416rehman_DeepZero_Ghidra when running any pipeline that includes the `GhidraDecompile` processor. It is the mandatory prerequisite for the GhidraDecompile implementation. Without a JDK, `analyzeHeadless` fails to launch.

System Requirements

Category Requirement Notes
OS Linux, macOS, or Windows JDK must match Ghidra's requirements
Hardware Same as Ghidra JDK adds modest overhead
Disk ~200-400 MB for JDK install Temurin 17 is typical

Dependencies

System Packages

  • JDK >= 17 (Eclipse Temurin tested in CI)

Python Packages

  • None (JDK is a system-level dependency)

Credentials

No credentials required. The JDK is a local open-source tool.

Required environment variables:

  • `JAVA_HOME` — path to the JDK installation root. Can also be set via the `GhidraDecompile` processor's `java_home` config field.

Quick Install

# Ubuntu/Debian (Eclipse Temurin 17)
sudo apt install -y temurin-17-jdk
export JAVA_HOME="/usr/lib/jvm/temurin-17-amd64"

# Or via SDKMAN
sdk install java 17.0.13-tem
export JAVA_HOME="$HOME/.sdkman/candidates/java/current"

# Verify
java -version
echo $JAVA_HOME

Code Evidence

JAVA_HOME injected into child process from `ghidra_decompile.py:276-279`:

env = dict(os.environ)
env["DEEPZERO_OUTPUT_DIR"] = str(output_dir)

if java_home:
    env["JAVA_HOME"] = java_home

Config field for java_home from `ghidra_decompile.py:111`:

java_home: str = ""

CI JDK setup from `.github/workflows/ci.yml:92-98`:

- name: Set up Java
  uses: actions/setup-java@v4
  with:
    distribution: temurin
    java-version: '17'

Pytest marker noting JDK requirement from `pyproject.toml:40-42`:

markers = [
    "ghidra: drives a local Ghidra install (requires GHIDRA_INSTALL_DIR)",
]

Common Errors

Error Message Cause Solution
`ghidra exited with code 1: ... JAVA_HOME ...` `JAVA_HOME` not set or invalid Set `JAVA_HOME` env var or `java_home` processor config
`UnsupportedClassVersionError` JDK too old for Ghidra version Use JDK 17+ (Ghidra 11 requires JDK 17+)
`java: command not found` JDK not on PATH Install JDK and add `bin/` to PATH

Compatibility Notes

  • JDK 17 required for Ghidra 11.x: CI uses Eclipse Temurin 17. Older JDKs may fail with `UnsupportedClassVersionError`.
  • Runner images ship JDKs: GitHub Actions runner images include JDKs, so CI resolves locally instead of reaching for apt.
  • Config or env var: `JAVA_HOME` can be set as an environment variable or via the processor's `java_home` config field (which takes precedence when set).
  • Test isolation: Ghidra tests are marked `@pytest.mark.ghidra` and excluded from the default test matrix so no interpreter pays for a JDK download.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment