if (classpath != null)
vmb.args().add("-cp").add(classpath);
vmb.args().add("-connectTo", "localhost:" + serverSocket.getLocalPort());
// TODO add XVFB options here
Proc p = vmb.launch(new LocalLauncher(listener)).stdout(listener).envs(envVariables).start();
Socket s = serverSocket.accept();
serverSocket.close();
return Channels.forProcess("Channel to " + displayName, Computer.threadPoolForRemoting, new BufferedInputStream(new SocketInputStream(s)),