[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] How can I embed a JAR in a plugin?
- From: "Jeremy Volkman" <jvolkman@xxxxxxxxx>
- Date: Wed, 9 May 2007 06:35:15 -0400
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WgsFDmtevI84awbOeM83WsnifEYd+cK1AyI79AjIrXscjsEYxe2mL8RJz19UwIqsCOZzCUDTApRctpYuP+MlosY9ckWFb1NL7kLo8wZSaWBmKWkTLkj13BmItDX132u/nbY4c/f3+Mx+43YYIzaJcmKoqz32WNwAJyue82ywM6Q=
If I understand your problem correctly, you're trying to include this
third party jar in your Eclipse target platform so that it can be used
by plugin projects in your workspace. If this is the case, you're
running into the fact that Eclipse PDE doesn't support developing
against bundles with embedded jars. This is not Equinox's problem,
but rather a side effect of PDE being dependent upon the JDT, and
JDT's inability to find a class that's within an embedded jar.
To put a bundle with an embedded jar in your target platform, simply
extract it. E.g., if your bundle was "com.somecompany.mybundle.jar",
you'd extract it to a directory called "com.somecompany.mybundle"
inside your plugins directory. You can see that many of the Eclipse
plugins are distributed like this.
Another thing to note is that you can change the PDE target platform
directory to something other than the Eclipse plugins directory. This
allows you full control over which bundles are available to your
workspace bundles and removes all the distributed Eclipse bundle
exports. The option is under Preferences -> Plug-in Development ->
Target Platform. This of course is not what you want if you're
developing an Eclipse plugin. :)
Hope that helps,
On 5/9/07, David Leangen <osgi@xxxxxxxxxxx> wrote:
Since many OSS projects do not package their code as osgi bundles, I've
had to create my own bundles from time to time.
This time, I thought that rather than including it as a project in my
Eclipse environment, I'll put the bundle in my plugins directory.
However, I have not yet been able to figure out how to expose the
classpath of the embedded jar file to my projects in the workspace.
If I directly compile the code (thus all the class files are in "." in
the bundle rather than in a jar in the bundle), I can include the bundle
this way without any problems.
I thought that I only needed to include the jar in the Bundle-ClassPath
entry in the manifest, but Equinox does not recognize this.
What does Equinox require that I do to expose this embedded jar to my
projects in Eclipse via my plugin bundle?
equinox-dev mailing list