将第三方库添加到eclipse插件 [英] Add 3rd party library to an eclipse plugin

查看:360
本文介绍了将第三方库添加到eclipse插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse插件中添加额外的JAR文件的正确方法是什么?我自己的插件需要apache-commons-io。我将JAR复制到我的插件目录中,并通过插件清单的依赖关系选项卡添加。这适用于我,但我的插件的其他用户将不得不手动下载Commons-IO。



在我的插件中打包Commons-IO的正确方法是什么?

解决方案>

我通常使用以下策略:




  • 如果我可以找到打包成捆绑的JAR - 即 MANIFEST.MF 包含正确的条目 - 然后我使用它。查看轨道项目,了解一系列各种预先包装的捆绑包。 org.apache.commons.io 已经在这里...

  • 如果不可能,那么我只是将JAR我的包,并更新 MANIFEST.MF - 例如 Bundle-ClassPath:library.jar,。


What is the right way to include an additional JAR file in an Eclipse plugin? My own plugin requires apache-commons-io. I copied the JAR into my plugins directory and added it via the "Dependencies" tab of the plugin manifest. This works for me, but other users of my plugins will have to download Commons-IO manually.

What is the correct way to package Commons-IO in my plugin?

解决方案

I usually use the following strategy:

  • If I can find the JAR in question packaged as a bundle - i.e. the MANIFEST.MF contains the correct entries - then I use this. Have a look at the Orbit project for a set of pre-packaged bundles of all sorts. org.apache.commons.io is already here...
  • If that is not possible, then I just include the JAR in my bundle, and updates MANIFEST.MF - e.g. Bundle-ClassPath: library.jar,.

这篇关于将第三方库添加到eclipse插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆