serverSocket.setSoTimeout(10000);
// use -cp + FQCN instead of -jar since remoting.jar can be rebundled
// (like in the case of the swarm plugin.)
vmb.classpath().addJarOf(Channel.class);
vmb.mainClass(Launcher.class);
if (classpath != null)
vmb.args().add("-cp").add(classpath);
vmb.args().add("-connectTo", "localhost:" + serverSocket.getLocalPort());