Setting awtAppClassName in Java9+1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Setting awtAppClassName in Java9+1

Felix Natter
hello Devs,

we are setting sun.awt.X11.XToolkit.awtAppClassName in order to display
"Freeplane" as application name in some linux desktops (e.g. GNOME3):

https://github.com/freeplane/freeplane/blob/1.6.x/freeplane_framework/src/main/java/org/freeplane/launcher/Launcher.java

However, this is not allowed when running JDK9+1:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.freeplane.launcher.Launcher (file:/usr/share/freeplane/freeplanelauncher.jar) to field sun.awt.X11.XToolkit.awtAppClassName
WARNING: Please consider reporting this to the maintainers of org.freeplane.launcher.Launcher
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I haven't found a workaround so far except for disabling this warning.

Do you have an idea how to fix this?

Cheers and Best Regards,
--
Felix Natter