Skip to content
Permalink
Browse files

Fixed Standard Out/In/Err

  • Loading branch information...
Ghost-Programmer committed Apr 12, 2019
1 parent 99d1ea8 commit 484d46bddd39d02a2b72ba87992b3f5901e4b1a5
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/name/mymiller/javafx/display/console/ConsoleDisplay.java
@@ -145,13 +145,13 @@ protected void startDisplay(Stage stage, double height, double width) throws Exc
switch (keyEvent.getCode()) {
case ENTER:
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
final BufferedReader reader = new BufferedReader(new InputStreamReader(this.getIn()));
final String text = reader.readLine();
this.history.add(text);
this.historyPointer = this.history.size();
if (this.onMessageReceivedHandler != null) {
this.onMessageReceivedHandler.accept(text);
System.out.print("==>");
this.getOut().print("==>");
}
} catch (final IOException e) {

@@ -178,10 +178,10 @@ protected void startDisplay(Stage stage, double height, double width) throws Exc
}
});

System.setOut(this.console.getOut());
System.setIn(this.console.getIn());
System.setErr(this.console.getOut());
System.out.print("==>");
// System.setOut(this.console.getOut());
// System.setIn(this.console.getIn());
// System.setErr(this.console.getOut());
this.getOut().print("==>");

final Scene scene = new Scene(border, Double.MAX_VALUE, Double.MAX_VALUE);
final URL styleSheetUrl = this.getStyleSheetUrl();

0 comments on commit 484d46b

Please sign in to comment.
You can’t perform that action at this time.