diff --git a/build.gradle b/build.gradle index 86ca0781..0a560b48 100644 --- a/build.gradle +++ b/build.gradle @@ -53,7 +53,7 @@ tasks.withType(AbstractArchiveTask) { } javafx { - version = "18" + sdk = "/home/scy/git/jfx-sandbox/build/sdk" modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.graphics' ] } @@ -198,7 +198,7 @@ application { "--add-opens=javafx.graphics/com.sun.glass.ui.mac=centerdevice.nsmenufx"] } if(headless) { - applicationDefaultJvmArgs += ["-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw"] + applicationDefaultJvmArgs += ["-Dglass.platform=Headless", "-Dprism.order=sw"] } } @@ -262,7 +262,7 @@ jlink { jvmArgs += ["-Dprism.lcdtext=false", "--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module"] } if(headless) { - jvmArgs += ["-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw"] + jvmArgs += ["-Dglass.platform=Headless", "-Dprism.order=sw"] } } addExtraDependencies("javafx") diff --git a/src/main/java/com/sparrowwallet/sparrow/Interface.java b/src/main/java/com/sparrowwallet/sparrow/Interface.java index ef2c73fe..2183bba2 100644 --- a/src/main/java/com/sparrowwallet/sparrow/Interface.java +++ b/src/main/java/com/sparrowwallet/sparrow/Interface.java @@ -8,13 +8,13 @@ public enum Interface { public static Interface get() { if(currentInterface == null) { boolean headless = java.awt.GraphicsEnvironment.isHeadless(); - boolean monocle = "Monocle".equalsIgnoreCase(System.getProperty("glass.platform")); + boolean glassHeadless = "Headless".equalsIgnoreCase(System.getProperty("glass.platform")); - if(headless || monocle) { + if(headless || glassHeadless) { currentInterface = TERMINAL; - if(headless && !monocle) { - throw new UnsupportedOperationException("Headless environment detected but Monocle platform not found"); + if(headless && !glassHeadless) { + throw new UnsupportedOperationException("Headless environment detected but Headless platform not found"); } } else { currentInterface = DESKTOP;