mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-1304: Removing illegal access to java.desktop/sun.awt.X11. Has side
effect of changing application name on Linux from "Ghidra" to "ghidra.Ghidra".
This commit is contained in:
parent
1508f3fee8
commit
e088d2a4ea
11 changed files with 91 additions and 33 deletions
|
@ -69,20 +69,6 @@ public class GhidraApplicationConfiguration extends HeadlessGhidraApplicationCon
|
|||
taskbar.setIconImage(ApplicationInformationDisplayFactory.getLargestWindowIcon());
|
||||
}
|
||||
}
|
||||
|
||||
// Set the application title for Linux.
|
||||
// This should not be necessary...hopefully in a future version of Java it will just work.
|
||||
Class<?> toolkitClass = Toolkit.getDefaultToolkit().getClass();
|
||||
if (toolkitClass.getName().equals("sun.awt.X11.XToolkit")) {
|
||||
try {
|
||||
final Field awtAppClassName = toolkitClass.getDeclaredField("awtAppClassName");
|
||||
awtAppClassName.setAccessible(true);
|
||||
awtAppClassName.set(null, "Ghidra");
|
||||
}
|
||||
catch (Exception e) {
|
||||
// Not sure what went wrong. Oh well, we tried.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void showUserAgreement() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue