Bug 20961 - Can't get complete classpath for project.
Summary: Can't get complete classpath for project.
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-25 13:29 EDT by John Pitman CLA
Modified: 2002-07-11 12:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Pitman CLA 2002-06-25 13:29:23 EDT
I am trying to get the complete classpath for a project, including (recursivly) 
the classpath for all exported dependent projects.  I need this in order to 
launch an external process (RMIC).  I can't find an API to do this.

IJavaProject.getResolvedClasspath(boolean) only returns the immediate classpath 
for the project.

I have tried building up the classpath myself, repeatedly using  
IProject.getReferencedProjects() to get the list of referenced projects, but 
this includes projects that have not been exported.

I can tell from the classpath entries returned by getResolvedClasspath if the 
entry corresponds to a project, and if it is exported, but I can't find a way 
to get from the entry to the actual project itself.

Is there a way to get this classpath information?
Comment 1 Philipe Mulet CLA 2002-06-25 18:55:36 EDT
The path of a project classpath entry corresponds to a project name (unique 
segment). 

Something like the following should provide you with the prerequisite Java 
project.

javaModel.getJavaProject(entry.getPath().lastSegment()) 

Note that project references may be a superset of the actual ones referenced 
onto the build path.

Ok to close ?
Comment 2 John Pitman CLA 2002-06-27 13:33:38 EDT
The suggestion works OK.  This can be closed.
Comment 3 Philipe Mulet CLA 2002-07-11 12:00:08 EDT
Closing