Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Loading classes dynamically form other plugins
Loading classes dynamically form other plugins [message #444814] Tue, 21 February 2006 10:13 Go to next message
Eclipse UserFriend
Hi,

I've got the following structure:
---------------------------------
- CustomerPlugin (dep. on BasicLibsProject)
- BasicLibsPlugin

Inside BasicLibs I want to load classes from CustomerPlugin dynamically
but it's not working because BasicLibsProject does not find classes
located in plugins it doesn't depends on. Is this somehow possible?

Tom
Re: Loading classes dynamically form other plugins [message #444819 is a reply to message #444814] Tue, 21 February 2006 10:29 Go to previous messageGo to next message
Eclipse UserFriend
The problem is that every plugin has its own classloader.
This classloader is especially designed to find classes quickly whithin
the own plugin and plugins it depends on.

So you could try to get the classloader from the CustomerPlugin by
CustomerPlugin.class.getClassLoader() and load the classes with this
class loader. :-)

I think it should work that way.

Regards,
Stefan

Tom Schindl schrieb:
> Hi,
>
> I've got the following structure:
> ---------------------------------
> - CustomerPlugin (dep. on BasicLibsProject)
> - BasicLibsPlugin
>
> Inside BasicLibs I want to load classes from CustomerPlugin dynamically
> but it's not working because BasicLibsProject does not find classes
> located in plugins it doesn't depends on. Is this somehow possible?
>
> Tom
Re: Loading classes dynamically form other plugins [message #444821 is a reply to message #444819] Tue, 21 February 2006 11:04 Go to previous messageGo to next message
Eclipse UserFriend
The moment you posted you're answer I found the answer myself. Nice to
see other people using RCP in Innsbruck.

http://www.martinlippert.com/publications/JS-Classloading-in -Eclipse-final-web.pdf

Greetings from the Rossau ;-)

Tom

Stefan Zugal wrote:
> The problem is that every plugin has its own classloader.
> This classloader is especially designed to find classes quickly whithin
> the own plugin and plugins it depends on.
>
> So you could try to get the classloader from the CustomerPlugin by
> CustomerPlugin.class.getClassLoader() and load the classes with this
> class loader. :-)
>
> I think it should work that way.
>
> Regards,
> Stefan
>
> Tom Schindl schrieb:
>
>> Hi,
>>
>> I've got the following structure:
>> ---------------------------------
>> - CustomerPlugin (dep. on BasicLibsProject)
>> - BasicLibsPlugin
>>
>> Inside BasicLibs I want to load classes from CustomerPlugin dynamically
>> but it's not working because BasicLibsProject does not find classes
>> located in plugins it doesn't depends on. Is this somehow possible?
>>
>> Tom
Re: Loading classes dynamically form other plugins [message #444822 is a reply to message #444819] Tue, 21 February 2006 11:04 Go to previous message
Eclipse UserFriend
The moment you posted you're answer I found the answer myself. Nice to
see other people using RCP in Innsbruck.

http://www.martinlippert.com/publications/JS-Classloading-in -Eclipse-final-web.pdf

Greetings from the Rossau ;-)

Tom

Stefan Zugal wrote:
> The problem is that every plugin has its own classloader.
> This classloader is especially designed to find classes quickly whithin
> the own plugin and plugins it depends on.
>
> So you could try to get the classloader from the CustomerPlugin by
> CustomerPlugin.class.getClassLoader() and load the classes with this
> class loader. :-)
>
> I think it should work that way.
>
> Regards,
> Stefan
>
> Tom Schindl schrieb:
>
>> Hi,
>>
>> I've got the following structure:
>> ---------------------------------
>> - CustomerPlugin (dep. on BasicLibsProject)
>> - BasicLibsPlugin
>>
>> Inside BasicLibs I want to load classes from CustomerPlugin dynamically
>> but it's not working because BasicLibsProject does not find classes
>> located in plugins it doesn't depends on. Is this somehow possible?
>>
>> Tom
Previous Topic:Running an RCP outside Eclipse
Next Topic:How do I add Console view.
Goto Forum:
  


Current Time: Sun Aug 31 03:56:56 EDT 2025

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

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

Back to the top