< prev index next >
src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java
Print this page
rev 3613 : imported patch 8131023
*** 59,72 ****
public static void main(String[] args) throws Exception {
String loopBack = null;
Socket socket = new Socket(loopBack, Integer.parseInt(args[0]));
InputStream inStream = socket.getInputStream();
OutputStream outStream = socket.getOutputStream();
! Map<String, Consumer<OutputStream>> chans = new HashMap<>();
! chans.put("out", st -> System.setOut(new PrintStream(st, true)));
! chans.put("err", st -> System.setErr(new PrintStream(st, true)));
! forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, chans);
}
// These three variables are used by the main JShell process in interrupting
// the running process. Access is via JDI, so the reference is not visible
// to code inspection.
--- 59,74 ----
public static void main(String[] args) throws Exception {
String loopBack = null;
Socket socket = new Socket(loopBack, Integer.parseInt(args[0]));
InputStream inStream = socket.getInputStream();
OutputStream outStream = socket.getOutputStream();
! Map<String, Consumer<OutputStream>> outputs = new HashMap<>();
! outputs.put("out", st -> System.setOut(new PrintStream(st, true)));
! outputs.put("err", st -> System.setErr(new PrintStream(st, true)));
! Map<String, Consumer<InputStream>> input = new HashMap<>();
! input.put("in", st -> System.setIn(st));
! forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, outputs, input);
}
// These three variables are used by the main JShell process in interrupting
// the running process. Access is via JDI, so the reference is not visible
// to code inspection.
< prev index next >