IRuntimeClasspathEntry[] entries = JavaRuntime
.computeUnresolvedRuntimeClasspath(proj);
// Remove JRE entry/entries.
IRuntimeClasspathEntry stdJreEntry = JavaRuntime
.computeJREEntry(configuration);
IRuntimeClasspathEntry projJreEntry = JavaRuntime.computeJREEntry(proj);
List<IRuntimeClasspathEntry> entryList = new ArrayList<IRuntimeClasspathEntry>(
entries.length);
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry entry = entries[i];
if (entry.equals(stdJreEntry))
continue;
if (entry.equals(projJreEntry))
continue;
entryList.add(entry);
}
// Resolve the entries to actual file/folder locations.
entries = entryList.toArray(new IRuntimeClasspathEntry[0]);
IRuntimeClasspathProvider provider = new StandardClasspathProvider();
entries = provider.resolveClasspath(entries, configuration);
// entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration);
Set<String> locations = new LinkedHashSet<String>();
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry entry = entries[i];
if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
String location = entry.getLocation();
if (location != null) {
locations.add(location);
}
}
}