Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0: Removing some unneeded JVM args now that "Inverted Color Mode" is gone

Ryan Kurtz45640e9bc649
diff --git a/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch b/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch
index db016ecd3f..179995684d 100644
--- a/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch
+++ b/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch
@@ -28,6 +28,6 @@
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="_Integration Test"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="ghidra.GhidraRun"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="_Integration Test"/>
- <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions&#13;&#10;-Djava.system.class.loader=ghidra.GhidraClassLoader&#13;&#10;-Xshare:off&#13;&#10;-Dfile.encoding=UTF8&#13;&#10;-Duser.country=US&#13;&#10;-Duser.language=en&#13;&#10;-Dsun.java2d.pmoffscreen=false&#13;&#10;-Dsun.java2d.xrender=true&#13;&#10;-Dsun.java2d.d3d=false&#13;&#10;-Xdock:name=&quot;Ghidra&quot;&#13;&#10;-Dvisualvm.display.name=Ghidra&#13;&#10;-Dpython.console.encoding=UTF-8&#13;&#10;--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED"/>
+ <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions&#13;&#10;-Djava.system.class.loader=ghidra.GhidraClassLoader&#13;&#10;-Xshare:off&#13;&#10;-Dfile.encoding=UTF8&#13;&#10;-Duser.country=US&#13;&#10;-Duser.language=en&#13;&#10;-Dsun.java2d.pmoffscreen=false&#13;&#10;-Dsun.java2d.xrender=true&#13;&#10;-Dsun.java2d.d3d=false&#13;&#10;-Xdock:name=&quot;Ghidra&quot;&#13;&#10;-Dvisualvm.display.name=Ghidra&#13;&#10;-Dpython.console.encoding=UTF-8"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:Framework Utility}"/>
</launchConfiguration>
diff --git a/Ghidra/Features/Base/.launch/Ghidra.launch b/Ghidra/Features/Base/.launch/Ghidra.launch
index 42b6b387c0..f518159878 100644
--- a/Ghidra/Features/Base/.launch/Ghidra.launch
+++ b/Ghidra/Features/Base/.launch/Ghidra.launch
@@ -30,5 +30,5 @@
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="Framework Utility"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="ghidra.GhidraRun"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Framework Utility"/>
- <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions&#13;&#10;-Djava.system.class.loader=ghidra.GhidraClassLoader&#13;&#10;-Xshare:off&#13;&#10;-Dfile.encoding=UTF8&#13;&#10;-Duser.country=US&#13;&#10;-Duser.language=en&#13;&#10;-Dsun.java2d.pmoffscreen=false&#13;&#10;-Dsun.java2d.xrender=true&#13;&#10;-Dsun.java2d.d3d=false&#13;&#10;-Xdock:name=&quot;Ghidra&quot;&#13;&#10;-Dvisualvm.display.name=Ghidra&#13;&#10;-Dpython.console.encoding=UTF-8&#13;&#10;--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED"/>
+ <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+IgnoreUnrecognizedVMOptions&#13;&#10;-Djava.system.class.loader=ghidra.GhidraClassLoader&#13;&#10;-Xshare:off&#13;&#10;-Dfile.encoding=UTF8&#13;&#10;-Duser.country=US&#13;&#10;-Duser.language=en&#13;&#10;-Dsun.java2d.pmoffscreen=false&#13;&#10;-Dsun.java2d.xrender=true&#13;&#10;-Dsun.java2d.d3d=false&#13;&#10;-Xdock:name=&quot;Ghidra&quot;&#13;&#10;-Dvisualvm.display.name=Ghidra&#13;&#10;-Dpython.console.encoding=UTF-8"/>
</launchConfiguration>
diff --git a/Ghidra/Framework/Docking/build.gradle b/Ghidra/Framework/Docking/build.gradle
index 4cc5963654..c041f1c13c 100644
--- a/Ghidra/Framework/Docking/build.gradle
+++ b/Ghidra/Framework/Docking/build.gradle
@@ -32,10 +32,6 @@ dependencies {
compileOnly "junit:junit:4.12"
}
-// For Java 9, we must explicitly export references to the internal classes we are using.
-// We export them to all "unnamed" modules, which are modules that don't define themselves
-// as a new Java 9 style module. Ghidra is currently using unnamed modules everywhere.
ext.addExports([
- 'java.desktop/sun.awt=ALL-UNNAMED',
- 'java.desktop/sun.awt.image=ALL-UNNAMED'
+ 'java.desktop/sun.awt=ALL-UNNAMED'
])
diff --git a/Ghidra/RuntimeScripts/Common/support/launch.properties b/Ghidra/RuntimeScripts/Common/support/launch.properties
index b0565ab802..340bcf8ec5 100644
--- a/Ghidra/RuntimeScripts/Common/support/launch.properties
+++ b/Ghidra/RuntimeScripts/Common/support/launch.properties
@@ -69,9 +69,6 @@ VMARGS_WINDOWS=-Dlog4j.skipJansi=true
# Ghidra does not use class data sharing, so explicitly turn it off to avoid the warning.
VMARGS=-Xshare:off
-# Permit "illegal reflective accesses" to enable JDK compatibility with Ghidra and 3rd party jars.
-VMARGS=--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED
-
# Persistent cache directory used by the application. This directory will be used to store
# persistent application caches for all users. The default location for Mac/Linux is the same as
# specified by java.io.tmpdir property. The default location for Windows corresponds to the
diff --git a/gradle/root/distribution.gradle b/gradle/root/distribution.gradle
index f44c8267ba..79acfe6f0a 100644
--- a/gradle/root/distribution.gradle
+++ b/gradle/root/distribution.gradle
@@ -134,10 +134,6 @@ task createJavadocs(type: Javadoc, description: 'Generate javadocs for all proje
options.addBooleanOption("html5", true)
options.addBooleanOption('Xdoclint:none', true)
-
- // Some internal packages are not public and need to be exported.
- options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
- "java.desktop/sun.awt=ALL-UNNAMED"])
}
@@ -192,12 +188,7 @@ task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all proj
// Newer versions of gradle set this to true by default.
// The JsonDoclet doesn't have the -notimestamp option so ensure it isn't set.
options.setNoTimestamp(false)
-
-
- // Some internal packages are not public and need to be exported.
- options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
- "java.desktop/sun.awt=ALL-UNNAMED"])
-
+
options.doclet = "JsonDoclet"
doFirst {
options.docletpath = new ArrayList(configurations.jsondoc.files)