External Jars of an IProject [message #332568] |
Wed, 29 October 2008 08:37  |
Eclipse User |
|
|
|
Hi,
i'm trying to convert a ILaunchConfiguration to a command string, that can
be executed on a command line.
My current problem are external Jar files a project can reference. I can't
figure out, how to get this information out of
ILaunchConfiguration/IProject objects.
Reference projects for example can be found like
IProject project = config.getFile().getProject();
project.getReferencedProjects()
But there is no project.getExternalLibraries().
cheers Andreas
|
|
|
|
Re: External Jars of an IProject [message #332686 is a reply to message #332569] |
Wed, 05 November 2008 09:40  |
Eclipse User |
|
|
|
Thanks Rem,
i didn't know about Eclipses "generic project" - "Java project" handling.
I just assumed everything would be done via key-value pairs in
ILaunchConfiguration.getAttributes.
Where can i find more information than the JavaDoc stuff?
IJavaProject javaproject = JavaCore.create(project);
IClasspathEntry[] cp = javaproject.getRawClasspath();
for (IClasspathEntry cpe : cp) {
if (cpe.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
classpath.add(cpe.getPath().toOSString());
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.04221 seconds