From fad960c192e14180125c52a9bf562223975b85e6 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 20 Aug 2024 15:18:44 +0200 Subject: [PATCH] terminal: restore pre java 22 behaviour for system.console call --- .../com/sparrowwallet/sparrow/terminal/SparrowTerminal.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/terminal/SparrowTerminal.java b/src/main/java/com/sparrowwallet/sparrow/terminal/SparrowTerminal.java index ab94f63e..1199e344 100644 --- a/src/main/java/com/sparrowwallet/sparrow/terminal/SparrowTerminal.java +++ b/src/main/java/com/sparrowwallet/sparrow/terminal/SparrowTerminal.java @@ -52,6 +52,9 @@ public class SparrowTerminal extends Application { AppServices.initialize(this, new TerminalInteractionServices()); + //Restore pre Java 22 behaviour, see https://www.oracle.com/java/technologies/javase/22-relnote-issues.html#JDK-8308591 + System.setProperty("jdk.console", "java.base"); + this.terminal = new DefaultTerminalFactory().createTerminal(); this.screen = new TerminalScreen(terminal); this.gui = new SparrowTextGui(this, screen, new DefaultWindowManager(), new EmptySpace(TextColor.ANSI.BLUE));