A DESCRIPTION OF THE PROBLEM :
Conditions: A native macOS java-application with a registered custom URL scheme and an installed OpenURIHandler.
On macOS 13.6.6 and earlier versions the installed OpenURIHandler is receiving OpenURIEvent when the custom URL scheme is triggered.
On macOS 14.x the OpenURIHandler is not receiving any events. You can see that the application is receiving events, because if the application is hidden and not having focus it is moved to the foreground and is receiving focus.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install a java-application on macOS 14.x, the application needs to specify a custom URL scheme, and it needs to install an OpenURIHandler to receive OpenURIEvent.
Trigger the custom URL scheme.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The installed OpenURIHandler is receiving an event when the custom URL scheme is triggered.
ACTUAL -
No event is delivered to the OpenURIHandler. The application is receiving events though, because if the application is hidden and not having focus it is moved to the foreground and is receiving focus.
---------- BEGIN SOURCE ----------
package com.looklet;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;
import java.awt.Desktop;
import java.net.URI;
import java.time.LocalDateTime;
public class OpenUriHandlerMacOs extends Application {
private TextFlow textFlow = new TextFlow();
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
addRow("waiting for URL event");
Desktop.getDesktop().setOpenURIHandler(event -> {
URI uri = event.getURI();
Platform.runLater(() -> addRow(uri.toString()));
});
primaryStage.setTitle("OpenUriHandlerMacOs");
primaryStage.setScene(new Scene(textFlow, 600, 400));
primaryStage.show();
}
private void addRow(String message) {
textFlow.getChildren().add(new Text(LocalDateTime.now() + ": " + message + System.lineSeparator()));
}
}
// This issue can't be executed as a test, there has to be an installed application with a custom URL scheme.
// This code can be used as a base for a simple application to reproduce the issue.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None.
FREQUENCY : always
Conditions: A native macOS java-application with a registered custom URL scheme and an installed OpenURIHandler.
On macOS 13.6.6 and earlier versions the installed OpenURIHandler is receiving OpenURIEvent when the custom URL scheme is triggered.
On macOS 14.x the OpenURIHandler is not receiving any events. You can see that the application is receiving events, because if the application is hidden and not having focus it is moved to the foreground and is receiving focus.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install a java-application on macOS 14.x, the application needs to specify a custom URL scheme, and it needs to install an OpenURIHandler to receive OpenURIEvent.
Trigger the custom URL scheme.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The installed OpenURIHandler is receiving an event when the custom URL scheme is triggered.
ACTUAL -
No event is delivered to the OpenURIHandler. The application is receiving events though, because if the application is hidden and not having focus it is moved to the foreground and is receiving focus.
---------- BEGIN SOURCE ----------
package com.looklet;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;
import java.awt.Desktop;
import java.net.URI;
import java.time.LocalDateTime;
public class OpenUriHandlerMacOs extends Application {
private TextFlow textFlow = new TextFlow();
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
addRow("waiting for URL event");
Desktop.getDesktop().setOpenURIHandler(event -> {
URI uri = event.getURI();
Platform.runLater(() -> addRow(uri.toString()));
});
primaryStage.setTitle("OpenUriHandlerMacOs");
primaryStage.setScene(new Scene(textFlow, 600, 400));
primaryStage.show();
}
private void addRow(String message) {
textFlow.getChildren().add(new Text(LocalDateTime.now() + ": " + message + System.lineSeparator()));
}
}
// This issue can't be executed as a test, there has to be an installed application with a custom URL scheme.
// This code can be used as a base for a simple application to reproduce the issue.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None.
FREQUENCY : always