String url = u.toExternalForm(); VMRunnerConfiguration config= new VMRunnerConfiguration("org.eclipse.jdt.internal.ui.snippeteditor.ScrapbookMain", classPath); config.setProgramArguments(new String[] {url});
	private boolean doLaunch(IJavaProject p, String mode, IFile page, String[] classPath, ILauncher launcherProxy) {		try {			IVMRunner runner= getVMRunner(p, mode);			if (runner == null) {				return false;			}						VMRunnerConfiguration config= new VMRunnerConfiguration("org.eclipse.jdt.internal.ui.snippeteditor.ScrapbookMain", classPath); //$NON-NLS-1$			ISourceLocator sl= new ProjectSourceLocator(p);			try {				IPath outputLocation =	p.getOutputLocation();				IResource outputFolder = p.getProject().getWorkspace().getRoot().findMember(outputLocation);				if (outputFolder == null) {					return false;				}				IPath osPath = outputFolder.getLocation();				java.io.File f = new java.io.File(osPath.toOSString());				URL u = null;				try {					u = f.toURL();				} catch (MalformedURLException e) {					return false;				}				String url = u.toExternalForm();				config.setProgramArguments(new String[] {url});			} catch (JavaModelException e) {				return false;			}						VMRunnerResult result= runner.run(config);			if (result != null) {				IDebugTarget dt = result.getDebugTarget();				IBreakpoint magicBreakpoint = createMagicBreakpoint(getMainType(p));				fScrapbookToVMs.put(page, dt);				fVMsToScrapbooks.put(dt, page);				fVMsToBreakpoints.put(dt, magicBreakpoint);				dt.breakpointAdded(magicBreakpoint);				Launch newLaunch= new Launch(launcherProxy, mode, page, sl,result.getProcesses(), dt);				IDebugUIEventFilter filter = new ScrapbookEventFilter(newLaunch);				fVMsToFilters.put(dt, filter);				DebugUITools.addEventFilter(filter);				DebugPlugin.getDefault().getLaunchManager().registerLaunch(newLaunch);				return true;			}		} catch (CoreException e) {			JavaPlugin.log(e);			ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), SnippetMessages.getString("ScrapbookLauncher.error.title"), SnippetMessages.getString("ScrapbookLauncher.error.exception"), e.getStatus()); //$NON-NLS-2$ //$NON-NLS-1$		}		return false;	}