langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java
changeset 42827 36468b5fa7f4
parent 41995 1ac75bf2dc3a
child 43770 a321bed02000
equal deleted inserted replaced
42826:563b42fc70ba 42827:36468b5fa7f4
    63         OutputStream outStream = socket.getOutputStream();
    63         OutputStream outStream = socket.getOutputStream();
    64         Map<String, Consumer<OutputStream>> outputs = new HashMap<>();
    64         Map<String, Consumer<OutputStream>> outputs = new HashMap<>();
    65         outputs.put("out", st -> System.setOut(new PrintStream(st, true)));
    65         outputs.put("out", st -> System.setOut(new PrintStream(st, true)));
    66         outputs.put("err", st -> System.setErr(new PrintStream(st, true)));
    66         outputs.put("err", st -> System.setErr(new PrintStream(st, true)));
    67         Map<String, Consumer<InputStream>> input = new HashMap<>();
    67         Map<String, Consumer<InputStream>> input = new HashMap<>();
    68         input.put("in", st -> System.setIn(st));
    68         input.put("in", System::setIn);
    69         forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, outputs, input);
    69         forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, outputs, input);
    70     }
    70     }
    71 
    71 
    72     // These three variables are used by the main JShell process in interrupting
    72     // These three variables are used by the main JShell process in interrupting
    73     // the running process.  Access is via JDI, so the reference is not visible
    73     // the running process.  Access is via JDI, so the reference is not visible