void (String[] args) { //myGlobalStart = System.nanoTime(); UUID uuid = null; String host = null; int port = -1; boolean keepRunning = false; // keep running after compilation ends until explicit shutdown if (args.length >= 3) { try { uuid = UUID.fromString(args[0]); } catch (Exception e) { System.err.println("Error parsing session id: " + e.getMessage()); System.exit(-1); } host = args[1]; try { port = Integer.parseInt(args[2]); } catch (NumberFormatException e) { System.err.println("Error parsing port: " + e.getMessage()); System.exit(-1); } if (args.length > 3) { keepRunning = Boolean.parseBoolean(args[3]); } } else { System.err.println("Insufficient number of parameters"); System.exit(-1); } try { final ExternalJavacProcess process = new ExternalJavacProcess(keepRunning); //final long connectStart = System.nanoTime(); if (process.connect(host, port)) { //final long connectEnd = System.nanoTime(); //System.err.println("Connected in " + TimeUnit.NANOSECONDS.toMillis(connectEnd - connectStart) + " ms; since start: " + TimeUnit.NANOSECONDS.toMillis(connectEnd - myGlobalStart)); process.myConnectFuture.channel().writeAndFlush( JavacProtoUtil.toMessage(uuid, JavacProtoUtil.createRequestAckResponse()) ); } else { System.err.println("Failed to connect to parent process"); System.exit(-1); } } catch (Throwable throwable) { throwable.printStackTrace(System.err); System.exit(-1); } }