Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to get classpath?
How to get classpath? [message #92911] Mon, 14 July 2003 06:15 Go to next message
Eclipse UserFriend
Originally posted by: m.bauer.signsoft.com

Hi,

my question is as following: I need a classpath, containing all entries of
the .classpath-files of all open projects (open project means, that the
project is displayed in the left upper view, right?). So the best way would
be to get all the projects
(ResourcesPlugin.getWorkspace().getRoot().getProjects()) and to ask each
project for its own classpath (which contains all pathes for e.g. jar
archives whicha re needed to compile it). Sadly there is no such method, or
am I wrong?.
So I have to parse the .classpath files for the <classpathentry> tag. So how
do i determine the path of this file to open it?

Thanks in advance

Michael Bauer
Re: How to get classpath? [message #93815 is a reply to message #92911] Tue, 15 July 2003 05:34 Go to previous message
Eclipse UserFriend
Michael,

You can use
JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).ge tJavaProjects()
and ask each Java project its classpath using
IJavaProject.getResolvedClasspath(true).

Jerome

"Michael Bauer" <m.bauer@signsoft.com> wrote in message
news:betvjo$grt$1@eclipse.org...
> Hi,
>
> my question is as following: I need a classpath, containing all entries of
> the .classpath-files of all open projects (open project means, that the
> project is displayed in the left upper view, right?). So the best way
would
> be to get all the projects
> (ResourcesPlugin.getWorkspace().getRoot().getProjects()) and to ask each
> project for its own classpath (which contains all pathes for e.g. jar
> archives whicha re needed to compile it). Sadly there is no such method,
or
> am I wrong?.
> So I have to parse the .classpath files for the <classpathentry> tag. So
how
> do i determine the path of this file to open it?
>
> Thanks in advance
>
> Michael Bauer
>
>
Previous Topic:indirectly references the missing type ( compiler error) -
Next Topic:Eclipse: How is it catching the windows shutdowm messages so well?
Goto Forum:
  


Current Time: Thu Jul 17 05:49:14 EDT 2025

Powered by FUDForum. Page generated in 1.30024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top