mbien commented on code in PR #9314:
URL: https://github.com/apache/netbeans/pull/9314#discussion_r3018344919
##########
platform/core.startup/src/org/netbeans/core/startup/Main.java:
##########
@@ -363,6 +366,24 @@ private static final Class getKlass(String cls) {
}
}
+ // moved from MainWindow::init to handle splash, etc.
+ private static void configureAWTAppClassName() {
+ Toolkit toolkit = Toolkit.getDefaultToolkit();
+ Class<?> xtoolkit = toolkit.getClass();
+ if (xtoolkit.getName().equals("sun.awt.X11.XToolkit")) { //NOI18N
+ // TODO those add --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED
+
+ //#183739 / JDK-6528430 - provide proper app name on Linux
+ try {
+ final Field awtAppClassName =
xtoolkit.getDeclaredField("awtAppClassName"); //NOI18N
Review Comment:
i find it curious that the field isn't final -> we are lucky here since
final might mean final in not too far future.
https://github.com/openjdk/jdk/blob/20c3082aac4381a5d38ed3abb34b3651b2d28e08/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java#L164
I think this is ok since it is only moving code around. But all those hacks
have to go away. Every `--add-opens` flag we set is a red flag.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists