return config.launch(mode, null);
}
private static ILaunchConfigurationWorkingCopy createConfig(String label, IVMInstall vmInstall, String classToLaunch, List<IPath> classpath, String[] bootClasspath, String vmArgs, String prgArgs, boolean debug, boolean showInDebugger, boolean saveConfig) throws CoreException {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchType = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy config = launchType.newInstance(null, label);
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(vmInstall).toString());
config.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);