Process p= null; try { p= Runtime.getRuntime().exec(cmdLine);  } catch (IOException e) { if (p != null) p.destroy(); showErrorDialog(ERROR_CREATE_PROCESS, new LauncherException(e)); return null; }  IProcess[] processes= new IProcess[] {DebugPlugin.getDefault().newProcess(p, renderCommandLine(cmdLine))};
	public VMRunnerResult run(VMRunnerConfiguration config) {		int port= SocketUtil.findUnusedLocalPort(null, 5000, 15000);		if (port == -1) {			String msg= JavaLaunchUtils.getResourceString(ERROR_NO_PORT+"message");			showErrorDialog(ERROR_LAUNCHING, new LauncherException(msg));			return null;		}		String location= getJDKLocation("");		if ("".equals(location)) {			String msg= JavaLaunchUtils.getResourceString(ERROR_NO_JDK12_SPECIFIED+"message");			showErrorDialog(ERROR_LAUNCHING, new LauncherException(msg));			return null;		}		String program= location + File.separator + "bin" + File.separator + "java";		Vector arguments= new Vector();		arguments.addElement(program);		String[] bootCP= config.getBootClassPath();		if (bootCP.length > 0) {			arguments.add("-Xbootclasspath:"+convertClassPath(bootCP));		} 				String[] cp= config.getClassPath();		if (cp.length > 0) {			arguments.add("-classpath");			arguments.add(convertClassPath(cp));		}		addArguments(config.getVMArguments(), arguments);		arguments.add("-Xdebug");		arguments.add("-Xnoagent");		arguments.add("-Djava.compiler=NONE");		arguments.add("-Xrunjdwp:transport=dt_socket,address=localhost:" + port);		arguments.add(config.getClassToLaunch());		addArguments(config.getProgramArguments(), arguments);		String[] cmdLine= new String[arguments.size()];		arguments.copyInto(cmdLine);		Process p= null;		try {			p= Runtime.getRuntime().exec(cmdLine);		} catch (IOException e) {			if (p != null)				p.destroy();			showErrorDialog(ERROR_CREATE_PROCESS, new LauncherException(e));			return null;		}		IProcess[] processes= new IProcess[] {DebugPlugin.getDefault().newProcess(p, renderCommandLine(cmdLine))};		ListeningConnector connector= getConnector();		if (connector == null) {			p.destroy();			String msg= JavaLaunchUtils.getResourceString(ERROR_NO_CONNECTOR+"message");			showErrorDialog(ERROR_LAUNCHING, new LauncherException(msg));			return null;		}		Map map= connector.defaultArguments();		specifyArguments(map, port);		try {			connector.startListening(map);			boolean retry= false;			do  {				try {					VirtualMachine vm= connector.accept(map);					connector.stopListening(map);					IDebugTarget debugTarget= JDIDebugModel.newDebugTarget(vm, renderDebugTarget(config.getClassToLaunch(), port), processes[0], true);					return new VMRunnerResult(debugTarget, processes);				} catch (InterruptedIOException e) {					retry= askRetry(CONNECT_TIMEOUT);				}			} while (retry);		} catch (IOException e) {			showErrorDialog(ERROR_CONNECT, new LauncherException(e));		} catch (IllegalConnectorArgumentsException e) {			showErrorDialog(ERROR_CONNECT, new LauncherException(e));		}		p.destroy();		return null;	}