Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » jars.extra.classpath and running plugins within Eclipse
jars.extra.classpath and running plugins within Eclipse [message #58297] Fri, 24 April 2009 11:54 Go to next message
Jochen Wuttke is currently offline Jochen WuttkeFriend
Messages: 41
Registered: July 2009
Member
Hi,

I have a plugin that relies on several JARs to work. Currently I include
them in the plugin with "jars.extra.classpath" in build.properties. That
at least leads to the JARs being included in the exported plugin.
However, when I try to test my plugin by running an "Eclipse
Application" with the plugin (workspace version) enabled, I get
ClassNotFoundExceptions when the plugin tries to access one of those JARs.

Now here's my question: How can I make those JARs available to an
Eclipse instance running as "Eclipse Application"?

Thanks for any help,
Jochen
Re: jars.extra.classpath and running plugins within Eclipse [message #58388 is a reply to message #58297] Fri, 24 April 2009 20:23 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
The jars.extra.classpath is a compile-time thing and doesn't affect runtime.

This is useful because there are some cases (ie contributing ant tasks,
because of class loader issues) where you don't want the jars to be
available to the bundle at runtime.

If you want them available at runtime, you need to put them on your
Bundle-ClassPath or do something with buddy class loading.

http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhan cements

-Andrew
Jochen wrote:
> Hi,
>
> I have a plugin that relies on several JARs to work. Currently I include
> them in the plugin with "jars.extra.classpath" in build.properties. That
> at least leads to the JARs being included in the exported plugin.
> However, when I try to test my plugin by running an "Eclipse
> Application" with the plugin (workspace version) enabled, I get
> ClassNotFoundExceptions when the plugin tries to access one of those JARs.
>
> Now here's my question: How can I make those JARs available to an
> Eclipse instance running as "Eclipse Application"?
>
> Thanks for any help,
> Jochen
Re: jars.extra.classpath and running plugins within Eclipse [message #59030 is a reply to message #58388] Thu, 30 April 2009 18:34 Go to previous message
Jochen Wuttke is currently offline Jochen WuttkeFriend
Messages: 41
Registered: July 2009
Member
Hi Andrew,

putting the JARs on the Bundle-ClassPath did not change anything.
And the rest on the page you linked looks like I have to change the
entire class-loading code? That looks like a lot of overkill to use a
simple JAR file.

Jochen


Andrew Niefer wrote:
> The jars.extra.classpath is a compile-time thing and doesn't affect
> runtime.
>
> This is useful because there are some cases (ie contributing ant tasks,
> because of class loader issues) where you don't want the jars to be
> available to the bundle at runtime.
>
> If you want them available at runtime, you need to put them on your
> Bundle-ClassPath or do something with buddy class loading.
>
> http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhan cements
>
> -Andrew
> Jochen wrote:
>> Hi,
>>
>> I have a plugin that relies on several JARs to work. Currently I
>> include them in the plugin with "jars.extra.classpath" in
>> build.properties. That at least leads to the JARs being included in
>> the exported plugin.
>> However, when I try to test my plugin by running an "Eclipse
>> Application" with the plugin (workspace version) enabled, I get
>> ClassNotFoundExceptions when the plugin tries to access one of those
>> JARs.
>>
>> Now here's my question: How can I make those JARs available to an
>> Eclipse instance running as "Eclipse Application"?
>>
>> Thanks for any help,
>> Jochen
Re: jars.extra.classpath and running plugins within Eclipse [message #596389 is a reply to message #58297] Fri, 24 April 2009 20:23 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
The jars.extra.classpath is a compile-time thing and doesn't affect runtime.

This is useful because there are some cases (ie contributing ant tasks,
because of class loader issues) where you don't want the jars to be
available to the bundle at runtime.

If you want them available at runtime, you need to put them on your
Bundle-ClassPath or do something with buddy class loading.

http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhan cements

-Andrew
Jochen wrote:
> Hi,
>
> I have a plugin that relies on several JARs to work. Currently I include
> them in the plugin with "jars.extra.classpath" in build.properties. That
> at least leads to the JARs being included in the exported plugin.
> However, when I try to test my plugin by running an "Eclipse
> Application" with the plugin (workspace version) enabled, I get
> ClassNotFoundExceptions when the plugin tries to access one of those JARs.
>
> Now here's my question: How can I make those JARs available to an
> Eclipse instance running as "Eclipse Application"?
>
> Thanks for any help,
> Jochen
Re: jars.extra.classpath and running plugins within Eclipse [message #596577 is a reply to message #58388] Thu, 30 April 2009 18:34 Go to previous message
Jochen Wuttke is currently offline Jochen WuttkeFriend
Messages: 41
Registered: July 2009
Member
Hi Andrew,

putting the JARs on the Bundle-ClassPath did not change anything.
And the rest on the page you linked looks like I have to change the
entire class-loading code? That looks like a lot of overkill to use a
simple JAR file.

Jochen


Andrew Niefer wrote:
> The jars.extra.classpath is a compile-time thing and doesn't affect
> runtime.
>
> This is useful because there are some cases (ie contributing ant tasks,
> because of class loader issues) where you don't want the jars to be
> available to the bundle at runtime.
>
> If you want them available at runtime, you need to put them on your
> Bundle-ClassPath or do something with buddy class loading.
>
> http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhan cements
>
> -Andrew
> Jochen wrote:
>> Hi,
>>
>> I have a plugin that relies on several JARs to work. Currently I
>> include them in the plugin with "jars.extra.classpath" in
>> build.properties. That at least leads to the JARs being included in
>> the exported plugin.
>> However, when I try to test my plugin by running an "Eclipse
>> Application" with the plugin (workspace version) enabled, I get
>> ClassNotFoundExceptions when the plugin tries to access one of those
>> JARs.
>>
>> Now here's my question: How can I make those JARs available to an
>> Eclipse instance running as "Eclipse Application"?
>>
>> Thanks for any help,
>> Jochen
Previous Topic:How to specify "categories" for products?
Next Topic:Declare an extension as optional?
Goto Forum:
  


Current Time: Thu Dec 18 16:33:35 GMT 2014

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

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