// Start VM.
String[] cmdLine = DebugPlugin.parseArguments(execString);
Process proc = Runtime.getRuntime().exec(cmdLine);
// The accept times out if the VM does not connect.
VirtualMachineImpl virtualMachine;
try {
virtualMachine = (VirtualMachineImpl) listenConnector.accept(args);
} catch (InterruptedIOException e) {
proc.destroy();
String message = NLS.bind(ConnectMessages.SocketLaunchingConnectorImpl_VM_did_not_connect_within_given_time___0__ms_1,
new String[] { ((Connector.IntegerArgument) args
.get("timeout")).value() }); //$NON-NLS-1$
throw new VMStartException(message, proc);
}
virtualMachine.setLaunchedProcess(proc);
return virtualMachine;
}