From 73700ad5781062a725bfdad0c17a863da5f0a7b4 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 23 Sep 2022 10:56:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-80483=2010.0linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=9B=BE=E8=A1=A8=E7=A9=BA=E6=95=B0=E6=8D=AE=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E7=82=B9=E4=B8=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/os/impl/SupportOSImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java index 3ec67200d5..801822e488 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java @@ -148,10 +148,15 @@ public enum SupportOSImpl implements SupportOS { }, OLD_STYLE_CHOOSER { - @Override public boolean support() { - return (OperatingSystem.isLinux() && Arch.getArch() == Arch.ARM) || MACOS_12_VERSION_ADAPTER.support(); + boolean javafxExist = true; + try { + Class.forName("javafx.stage.FileChooser"); + } catch (ClassNotFoundException e) { + javafxExist = false; + } + return !javafxExist || (OperatingSystem.isLinux() && Arch.getArch() == Arch.ARM) || MACOS_12_VERSION_ADAPTER.support(); } },