I am using Eclipse 3.2. I am facing trouble resolving dependencies on an
external plug-in that my plug-in project requires.

I have a plug-in project which is dependent on a jar, say jar X. This jar
is not directly available but is present in another plug-in, say Plug-in
A. When I put plug-in A in my build path, I cannot compile my code
successfully as the symbols used in my project from Jar X are not
successfully resolved. So When I extract Jar X from Plug-in A and put it
in my build path, the code is successfully compiled but i get a
ClassNotFoundError for one of the classes from Jar X during runtime. I
even tried putting Plug-in A as a required-bundle in my manifest file, but
without success.

How do I solve this? How do I make the jars within the external plug-in be
recognised during build as well as during runtime?

1. I suppose you HAVE WRITE access to the external plugin.
Open the MANIFEST.MF file of the external plugin. Go to the Runtime Tab.
Look at the Classpath section.
In this section you should describe the jars that are part of your plugin
class path. This jars will be part of your runtime. Click on the Add..
button and add the desired jar.
After that Look at the Exported Packages section. Click on Add... and select
those packages of the jar that you would like to be seen in the runtime.

2. I suppose you do NOT HAVE WRITE access to the external plugin.
Since the jar is used, but it is not exported by the external plugin i don`t
think you can use this jar through the external plugin.
I am not sure how to achieve this.
Is this your case?

Best Regards,
Kiril

"hima" <himabindu.chamarthy@gmail.com> wrote in message
news:13c9fe29e9da03b62a80917e6f2e75d2$1@www.eclipse.org...
> Hi,
>
> I am using Eclipse 3.2. I am facing trouble resolving dependencies on an
> external plug-in that my plug-in project requires.
>
> I have a plug-in project which is dependent on a jar, say jar X. This jar
> is not directly available but is present in another plug-in, say Plug-in
> A. When I put plug-in A in my build path, I cannot compile my code
> successfully as the symbols used in my project from Jar X are not
> successfully resolved. So When I extract Jar X from Plug-in A and put it
> in my build path, the code is successfully compiled but i get a
> ClassNotFoundError for one of the classes from Jar X during runtime. I
> even tried putting Plug-in A as a required-bundle in my manifest file, but
> without success.
>
> How do I solve this? How do I make the jars within the external plug-in be
> recognised during build as well as during runtime?
>

>Hi,
>
>I am using Eclipse 3.2. I am facing trouble resolving dependencies on an
>external plug-in that my plug-in project requires.
>
>I have a plug-in project which is dependent on a jar, say jar X. This jar
>is not directly available but is present in another plug-in, say Plug-in
>A. When I put plug-in A in my build path, I cannot compile my code
>successfully as the symbols used in my project from Jar X are not
>successfully resolved. So When I extract Jar X from Plug-in A and put it
>in my build path, the code is successfully compiled but i get a
>ClassNotFoundError for one of the classes from Jar X during runtime.

You have to specify your X.jar as a runtime dependency in your
plugin.xml or manifest file. This can be done with the plugin.xml
editor on the "Runtime" tab inside the "Classpath" list.

I
>even tried putting Plug-in A as a required-bundle in my manifest file, but
>without success.

This would be possible if plug-in A was set to reexport the X.jar
(which is mostly a bad idea because you may end up in .jar version
hell).

>
>How do I solve this? How do I make the jars within the external plug-in be
>recognised during build as well as during runtime?

Add the X.jar to your plug-ins lib directory, add it to the classpath
in your plugin description and you're set. If you have a launch
configuration in the IDE you may have to check if the dependency is
correctly resolved (should be done internal by Eclipse).