terminal: restore pre java 22 behaviour for system.console call

This commit is contained in:
Craig Raw 2024-08-20 15:18:44 +02:00
parent 1adeef04db
commit fad960c192

View file

@ -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));