RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v2]

Kevin Rushforth kcr at openjdk.org
Tue Apr 29 20:16:47 UTC 2025


On Tue, 29 Apr 2025 09:45:37 GMT, Pabulaner IV <duke at openjdk.org> wrote:

> As far as I tested it without the fix only one of the following two things works: the native menu bar or the open url handler.

When you say "native menu bar" I presume you mean the JavaFX SystemMenuBar feature, right?

> Because if JFX is installed first, the native menu bar works, but since AWT is then running embedded, the url handler doesn't work. If JDK / AWT is installed first the open url handler works, but not the native menu bar, since JFX is then running embedded.

This is what I expected, and answers question 1: the OpenURIHandler feature doesn't work when JavaFX is initialized first and AWT is running embedded.

> My fix works for the first issue, as it lets JFX send the OpenURL event to AWT and therefore fixes it.

This doesn't answer question 2, which was _how_ this fixes the problem. As I said above: "In the case where AWT is running embedded, the `[ApplicationDelegate init]` receiver never gets called." So the code you moved / added in `ApplicationDelegate::init` shouldn't ever be executed in the case you are trying to make work. So I don't understand how this PR, which is the AWT portion of the fix, can possibly make any difference in the failing case. That's why I provided the debug patch and asked if you could do a test run, adding the log output as a comment or attachment.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840131193


More information about the client-libs-dev mailing list