// return new URLClassLoaderX(EclipseProjectBuilder
// .computeProjectOutputURLs(projectFile).toArray(
// ZERO_LENGTH_URL_ARRAY), ProjectUtils.class
// .getClassLoader());
List<URL> urls = new ArrayList<URL>();
EclipseProject project = new EclipseProject(projectFile);
urls.add(project.getOutputDirectory().toURI().toURL());
for (EclipseMetafile dependent : project.getAllDependants()) {
if (dependent instanceof CompiledJar) {
urls.add(((CompiledJar) dependent).getFile().toURI().toURL());
} else if (dependent instanceof EclipseProject) {
EclipseProject dependentProject = (EclipseProject) dependent;
urls.add(dependentProject.getOutputDirectory().toURI().toURL());
} else if (dependent instanceof EclipseClasspath) {
// EclipseClasspath classpath = ( EclipseClasspath )dependent;
}
}
return new URLClassLoaderX(urls.toArray(ZERO_LENGTH_URL_ARRAY));