diff --git a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/TracerLaunchConfigurationDelegate.java b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/TracerLaunchConfigurationDelegate.java index caa64f9..b25418c 100644 --- a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/TracerLaunchConfigurationDelegate.java +++ b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/TracerLaunchConfigurationDelegate.java @@ -1,9 +1,11 @@ package org.ntlab.traceCollector; import java.io.File; +import java.io.IOException; import java.util.Map; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.debug.core.ILaunch; @@ -62,13 +64,14 @@ // Classpath String[] configClasspath = getClasspath(configuration); String[] classpath; - String bundlePath = Activator.getDefault().getBundle().getLocation(); - if (bundlePath.startsWith("reference:file:/")) { +// String bundlePath = Activator.getDefault().getBundle().getLocation(); + try { + String bundlePath = FileLocator.resolve(Activator.getDefault().getBundle().getEntry("/")).getPath(); classpath = new String[configClasspath.length + 2]; System.arraycopy(configClasspath, 0, classpath, 0, configClasspath.length); - classpath[configClasspath.length] = bundlePath.substring(16) + "bin/"; - classpath[configClasspath.length + 1] = bundlePath.substring(16) + Tracer.JAVASSIST_LIBRARY; - } else { + classpath[configClasspath.length] = bundlePath.substring(1) + "bin/"; + classpath[configClasspath.length + 1] = bundlePath.substring(1) + Tracer.JAVASSIST_LIBRARY; + } catch (IOException e) { classpath = configClasspath; }