How to Integrate Ghidra with Eclipse Using the GhidraDev Plugin

The GhidraDev Eclipse plugin provides the official bridge to develop, debug, and run Ghidra scripts and modules directly from Eclipse by linking your Ghidra installation to Java projects and supplying custom launch configurations.

Integrating Ghidra with Eclipse streamlines reverse engineering workflows by enabling IDE features like code completion, debugging, and project management for Ghidra extensions. The National Security Agency's Ghidra repository includes the GhidraDev plugin, which handles installation linking, classpath configuration, and launch delegation. This guide explains the architecture, installation methods, and programmatic hooks needed to connect Ghidra with your Eclipse environment.

GhidraDev Plugin Architecture

The plugin consists of three core layers defined in the GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/ directory:

  • Installation & UI Layer: Defined in plugin.xml, providing wizards, preference pages, and menu contributions under the GhidraDev category.
  • Project Utilities Layer: Implemented in GhidraProjectUtils.java, handling Ghidra installation linking, classpath population, and PyDev configuration.
  • Launch Delegation Layer: Managed by GhidraLaunchDelegate.java, supplying custom run configurations for both GUI and headless Ghidra instances.

Installing the GhidraDev Plugin

You can install the plugin using three methods supported by the Ghidra source code.

Manual Installation via ZIP Archive

  1. Navigate to <GhidraInstallDir>/Extensions/Eclipse/GhidraDev/ and locate the plugin ZIP file.
  2. In Eclipse, select Help → Install New Software… → Add… → Archive… and choose the ZIP.
  3. Check the Ghidra or GhidraDev category and complete the installation wizard.

Online Installation via Update Site

Add the official update site URL to Eclipse:


https://github.com/NationalSecurityAgency/ghidra-data/raw/main/Eclipse/GhidraDev/latest

Navigate to Help → Install New Software…, paste the URL, and install the Ghidra category. This method requires Eclipse 2023-12 or later and JDK 21, as specified in the plugin's README.md.

Automatic Installation Through Ghidra

Click the Eclipse button in Ghidra's Script Manager. When prompted, provide your Eclipse installation path. Ghidra automatically copies the plugin into Eclipse's dropins directory if not already present, implementing the EclipseIntegrationService interface found in Ghidra/Features/Base/src/main/java/ghidra/app/services/EclipseIntegrationService.java.

Linking Ghidra to an Eclipse Project

When creating a Ghidra Script Project or Ghidra Module Project, the wizard invokes GhidraProjectUtils.linkGhidraToProject() to establish the connection. This method performs four critical actions:

  1. Resolves the Ghidra installation directory using ghidraLayout.getApplicationInstallationDir()
  2. Configures the JRE VM by locating or creating the matching VM install in Eclipse
  3. Builds the classpath with all Ghidra module JARs via getGhidraLibraryClasspathEntries()
  4. Creates a linked folder named "Ghidra" pointing to the installation directory
// Resolve Ghidra installation
File ghidraInstallDir = ghidraLayout.getApplicationInstallationDir().getFile(false);

// Configure VM
IVMInstall vm = getGhidraVm(appConfig);
IPath vmPath = new Path(JavaRuntime.JRE_CONTAINER)
        .append(vm.getVMInstallType().getId())
        .append(vm.getName());

// Build classpath with Ghidra libraries
List<IClasspathEntry> libEntries = getGhidraLibraryClasspathEntries(ghidraLayout);
classpathEntriesToKeep.addAll(libEntries);

// Create linked folder
IFolder ghidraFolder = javaProject.getProject().getFolder(GhidraProjectUtils.GHIDRA_FOLDER_NAME);
ghidraFolder.createLink(new Path(ghidraInstallDir.getAbsolutePath()),
                         IResource.REPLACE, monitor);

This process automatically generates Ghidra (GUI) and Ghidra Headless run configurations through GhidraLaunchUtils.createLaunchConfig().

Developing and Debugging Ghidra Scripts

Creating Projects

From the Project Explorer, select New → Ghidra → Ghidra Script for single scripts or Ghidra Module Project for full extensions. The wizard:

  • Creates the source folder structure
  • Adds required Ghidra libraries to the Java build path
  • Optionally configures Python support via PyDevUtils.setupPythonForProject() if PyDev 9.3.0+ is installed

Running and Debugging

The GhidraLaunchDelegate class handles execution. To launch:

  • Run: Select Run → Run Configurations… → Ghidra to start ghidra.GhidraRun
  • Debug: Select Debug → Debug As → Ghidra to launch with debugging enabled

The delegate automatically:

  • Switches to the Debug perspective using IPerspectiveDescriptor and IDebugUIConstants.ID_DEBUG_PERSPECTIVE
  • Injects VM arguments from application.properties via appConfig.getLaunchProperties().getVmArgs()
  • Sets system properties for external modules (-Dghidra.external.modules)
  • Initializes the PyDev remote debugger when Python support is detected

Troubleshooting Integration Issues

Symptom Solution
"Failed to launch project … Ghidra folder not found" Verify the Ghidra linked folder points to a valid installation directory without a top-level build/ folder
Debug launch fails to switch perspectives Ensure the Eclipse Debug UI plugin is installed; the delegate relies on IPerspectiveDescriptor
Python support unavailable Install PyDev 9.3.0+ and configure a Jython or PyGhidra interpreter; the wizard auto-detects via PyDevUtils
Classpath resolution errors Check that GhidraProjectUtils.getGhidraLibraryClasspathEntries() can access all module JARs in the linked installation

Programmatic Integration Examples

Linking Ghidra to an Existing Project

IJavaProject javaProject = ...;  // Obtain from workspace
File ghidraInstall = new File("/opt/ghidra_12.1");
GhidraApplicationLayout layout = new GhidraApplicationLayout(ghidraInstall);
AppConfig appConfig = new AppConfig(ghidraInstall);

// Link installation with full classpath and PyDev setup
GhidraProjectUtils.linkGhidraToProject(
        javaProject,
        layout,
        appConfig,
        null,  // Use default Python interpreter
        new NullProgressMonitor());

Creating Launch Configurations Programmatically

IJavaProject project = ...;
ILaunchConfigurationWorkingCopy workingCopy = GhidraLaunchUtils.createLaunchConfig(
        project,
        GhidraLaunchUtils.GUI_LAUNCH,  // or HEADLESS_LAUNCH
        project.getProject().getName(),
        "1024m"  // Max heap size
);
workingCopy.doSave();  // Persists to .launch file

Summary

  • The GhidraDev plugin provides official Eclipse integration for Ghidra development, located in GhidraBuild/EclipsePlugins/GhidraDev/.
  • Install via ZIP archive, online update site, or automatic Ghidra-driven installation to dropins.
  • Use GhidraProjectUtils.linkGhidraToProject() to connect installations, which creates the "Ghidra" linked folder and configures the classpath.
  • Launch configurations are managed by GhidraLaunchDelegate, supporting both GUI and headless modes with automatic VM argument injection.
  • PyDev 9.3.0+ is required for Python debugging support, auto-configured through PyDevUtils.

Frequently Asked Questions

What Eclipse version is required for the GhidraDev plugin?

The GhidraDev plugin requires Eclipse 2023-12 or later and JDK 21, as documented in the plugin's README.md. Earlier Eclipse versions may not support the required JDT or debug interface implementations used by GhidraLaunchDelegate.

Can I develop Python scripts using the GhidraDev plugin?

Yes, the plugin supports Python development through PyDev integration. When you enable Python support during project creation, the wizard calls PyDevUtils.setupPythonForProject() to configure the interpreter. You must install PyDev 9.3.0 or later separately, and the plugin will auto-detect Jython or PyGhidra interpreters for debugging Ghidra scripts.

How does the plugin handle Ghidra updates?

When you update Ghidra, relink the installation by right-clicking the project and selecting Ghidra → Link Ghidra, which re-invokes GhidraProjectUtils.linkGhidraToProject(). This refreshes the linked "Ghidra" folder and updates the classpath entries to point to new JAR versions in the updated installation directory.

Where are the Ghidra launch configurations stored?

The plugin creates launch configurations in your project's .launch folder using GhidraLaunchUtils.createLaunchConfig(). These XML files define the Ghidra and Ghidra Headless run types, storing VM arguments from application.properties and the project-specific classpath required to start the Ghidra runtime from Eclipse.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →