0

当我在我的 Windows 笔记本电脑上启动它时,它运行良好。但在 MACOS 中它会抛出一个NSException

void openInBrowserOnMouseClick(MouseEvent event) {
    if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
        LOGGER.info("Action browsing is not supported on this platform");
        return;
    } else if (subject.getSite() == null) {
        showAlert(AlertType.WARNING, "Warning", "No site provided", "You should provide subject's site first");
        return;
    }
    try {
        Desktop.getDesktop().browse(new URI(subject.getSite()));
    } catch (IOException | URISyntaxException e) {
        LOGGER.error("Browsing error", e);
    }
}

NSException 堆栈跟踪

4

0 回答 0