|Re: Handle to project's classloader [message #303667 is a reply to message #303641]
||Thu, 18 May 2006 14:41
Originally posted by: kautulm.bea.com|
Let's say that I have a project foo of type 'Web project' in my workspace.
Now, it has dependencies defined on other projects and so on. So, at runtime
when this web project is deployed, it will have a classloader of it's own
which will define what all this web project can access. My plugin needs the
design time equivalent of this classloader to find classes/resources that
this web project can access. So, my question is how do I get a handle to a
project's classloader/classpath. There is a way of doing this for java
projects through IJavaProject.getResolvedClasspath(), but what about other
types of projects.
"Paul Webster" <email@example.com> wrote in message
> Kautul Mehta wrote:
>> Does anybody know how can I can get a handle to a project's classloader?
>> My plugin needs access to the project's classloader and I am not able to
>> find a way to get a handle to it.
> What's a project classloader? When eclipse is running you have the
> application classpath (which is startup.jar) and the bundle classpaths.
> Within your plugin, you can see your own plugin classloader.
> You can get eclipse to load classes from any plugin using that plugin's
> Bundle#loadClass(*) method. You can find bundles using
> Through OSGi, you can also get find the bundle that loaded a particular
Powered by FUDForum
. Page generated in 0.02967 seconds