Open yadobler opened 1 month ago
@yadobler For someone using Linux waylaid, what's the impact of this problem? Can the app be used as per normal, provided the help menu is left alone?
@damithc yup it is possible to use it as normal (ignoring the menubar issue).
I have not tried i18n input yet, but I believe it might also be a problem with wayland (as seen in electron apps) - it is fixable by setting some env vars (see below), in particular the gtk
one.
I think the only main caveat is openjfx needs to be installed in addition to openjdk (for java >= 11).
Depending on the system, _JAVA_AWT_WM_NONREPARENTING
needs to be set.
I think this is not wayland or jfx related, it's a more broader problem with java and Linux (and how java reacts to different DEs) - this issue pops up when trying to run native java apps like ArduinoIDE and even IntelliJ. It might be related to swing.
I18n fixes:
QT_QPA_PLATFORM=wayland
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
SDL_IM_MODULE=fcitx
XMODIFIERS="@im=fcitx"
I see. Thanks for the investigation @yadobler We can add these details to https://se-education.org/guides/tutorials/javaInstallationLinux.html if a Linux users sends a PR. As for the tP, we can assume that Linux users are aware of these problems and already know how to fix them. If the team chooses to (not required to), they can also mention this as a 'known issue' in the UG. Do you think the above is sufficient?
I think it is great for ubuntu / Debian users, which should cover most uses.
I am comparing it to the arch linux wiki for java, which is overly comprehensive but targeted to arch / pacman package management / manual installation.
And I feel if anyone's using arch, they are competent enough to figure out how to get their system working
So I think it might be alright
The only issue is that openjfx 17 does not natively support wayland, so the xwayland fallback is very buggy. V21 onwards apparently is supposed to solve this.
I know there's an active development by Oracle (project Wakefield) to natively support wayland.
For now javafx 17 works fine, unless trying to open the menu.
I'm using Wayland on Linux:
Right now the current setup for AB3-forked projects use version
17.0.7
as defined in thebuild.gradle
file. However, this means the menu-bar in the javafx application does not work (clicking it will make the menu flash and disappear).If
javaFxVersion
is edited to be22.0.1
instead, the menu bar works:(it is still buggy though - I can move the main window with the opened menu stuck in place but that is javafx issue)
are we allowed to either:
Note: using
GDK_BACKEND=x11
does not fix this issue