Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to resolve external dependencies for a plugin at runtime
How to resolve external dependencies for a plugin at runtime [message #293206] Wed, 19 October 2005 20:03 Go to next message
Eclipse UserFriend
I have a class that implements a simple TreeViewer. The model for the
viewer uses some XMLBeans which create external dependencies. I can run
this as a standalone application without any problems, all the classpath
dependencies get resolved.

I have converted this class into a plugin. The problem I am having is
that when I try to run the plugin in a workbench runtime instance, I get
NoClassDefFoundErrors.

From the reading I have done on the newsgroups, it seems like I have to
make all these external dependencies into plugins. Is that true? If so
can someone steer me towards the docs for that? If it is not true, what
am I doing wrong? I haven't found anyway to setup the runtime instance so
that it will see my external jars.

Thanks in advance for any suggestions.

Jon
Re: How to resolve external dependencies for a plugin at runtime [message #293243 is a reply to message #293206] Thu, 20 October 2005 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Jon Svede wrote:
> I have converted this class into a plugin. The problem I am having is
> that when I try to run the plugin in a workbench runtime instance, I get
> NoClassDefFoundErrors.
>
> From the reading I have done on the newsgroups, it seems like I have to
> make all these external dependencies into plugins. Is that true?

Yes, it's true. The eclipse OSGi platform manages the plugin classpaths
.... so the manifests must contain the correct classpath information.

> If so
> can someone steer me towards the docs for that? If it is not true, what
> am I doing wrong? I haven't found anyway to setup the runtime instance
> so that it will see my external jars.

1) I'd create a plugin using "New>Plug-in Development>Plug-in from
existing JAR archives" ... select all of the xml beans jars, and you've
turned them into one plugin ... then make sure the plugin exports all of
the packages you need to access from your other plugins.

or 2) If you want to create a plugin that contains the xmlbeans jars as
individual jars, see this message:

http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg06980.html

or 3) apparently the Bundle-Classpath: supports classpath entries of the
form "external:/path/to/external.jar" ... although I haven't been able
to get it to work, and I can see it leading to versioning and deployment
problems.

Later,
PW
Re: How to resolve external dependencies for a plugin at runtime [message #293301 is a reply to message #293243] Thu, 20 October 2005 13:01 Go to previous message
Eclipse UserFriend
Thanks for this, it resolved my issue.

The only thing I forgot to mention was that I am using 3.0.1 which doesn't
seem to have the feature listed as you described.

My work around for this was to use 3.1 to create the plugin as you
described for 3.0.

Afterwards it works like a charm on 3.0.1!

Jon
Previous Topic:What triggers an AutoBuild?
Next Topic:Performance benchmarking
Goto Forum:
  


Current Time: Sat Jun 21 14:07:12 EDT 2025

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

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

Back to the top