Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0: JPype 1.5.1 windows issue workaround

Ryan Kurtz8c56eb6d00b2
diff --git a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py
index e16c5ca4a7..9fc258d123 100644
--- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py
+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py
@@ -377,6 +377,10 @@ class PyGhidraLauncher:
# set the JAVA_HOME environment variable to the correct one so jpype uses it
os.environ['JAVA_HOME'] = str(self.java_home)
+
+ # add bin dir to DLL search path to help address JPype 1.5.1 issue
+ if sys.platform == "win32":
+ os.add_dll_directory(str(self.java_home) + "/bin")
jpype_kwargs['ignoreUnrecognized'] = True