package org.ntlab.reverseDebugger; import java.io.IOException; import org.eclipse.core.runtime.FileLocator; import org.ntlab.traceCollector.IAdditionalLaunchConfiguration; public class ReverseDebuggerLaunchConfiguration implements IAdditionalLaunchConfiguration { public static final String TEST_PATH = "org/ntlab/reverseDebugger/ReverseDebuggerLaunchConfiguration.class"; public static final String ANALYZER_PATH = "org/ntlab/reverseDebugger/OnlineTraceAnalyzer.class"; @Override public String[] getAdditionalClasspath() { try { // String tracerClassPath = FileLocator.resolve(this.getClass().getClassLoader().getResource(TEST_PATH)).getPath(); String tracerClassPath = FileLocator.resolve(this.getClass().getClassLoader().getResource(ANALYZER_PATH)).getPath(); System.out.println(tracerClassPath); // String classPath = tracerClassPath.substring(1, tracerClassPath.length() - TEST_PATH.length()); String classPath = tracerClassPath.substring(1, tracerClassPath.length() - ANALYZER_PATH.length()); System.out.println(classPath); return new String[]{classPath}; } catch (IOException e) { e.printStackTrace(); } throw new IllegalStateException(); } }