Skip to content

Ghidra is a software reverse engineering (SRE) framework

Ignore commented Java home overrides in PyGhidra launch properties

Rudy Celekli91845a6a147d
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 79032156f2..c2b30eea6f 100644
--- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py
+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py
@@ -291,6 +291,8 @@ class PyGhidraLauncher:
launch_properties = root / "support" / "launch.properties"
for line in Path(launch_properties).read_text().splitlines():
+ if line.lstrip().startswith(("#", "//")):
+ continue
_, _, override = line.partition("JAVA_HOME_OVERRIDE=")
if override:
if override.startswith('"') and override.endswith('"'):