Skip to main content



      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 07:54 Go to next message
Eclipse UserFriend
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 16:23 Go to previous messageGo to next message
Eclipse UserFriend
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 14:34 Go to previous message
Eclipse UserFriend
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 16:23 Go to previous message
Eclipse UserFriend
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 14:34 Go to previous message
Eclipse UserFriend
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 May 01 22:35:15 EDT 2025

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

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

Back to the top