Community
Participate
Working Groups
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?
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 ?
The suggestion works OK. This can be closed.
Closing