简体   繁体   English

如何使用jar库刷新Eclipse RCP插件

[英]How to refresh Eclipse RCP plugin with jar libraries

I have one Eclipse RCP plugin (A) that include another one with jar libraries (B) and it works but i want to add there another jar library and i cant refresh my Eclipse RCP Plugin (A) to make packages from new jar visible. 我有一个Eclipse RCP插件(A),其中包括一个带有jar库的插件(B),它可以工作,但是我想在其中添加另一个jar库,但是我无法刷新我的Eclipse RCP插件(A)以使新jar的软件包可见。

I added new jar in MANIFEST.MF and Properties->Java build Path->Libraries as i had added a lot of others jar libraries. 我在MANIFEST.MF和Properties-> Java build Path-> Libraries中添加了新的jar,因为我添加了许多其他jar库。

Should i refresh project somehow to make it visible? 我应该以某种方式刷新项目以使其可见吗?

I use Eclipse for RCP and RAP Developers 我将Eclipse用于RCP和RAP开发人员

Version: Mars.1 Release (4.5.1) Build id: 20150924-1200 版本:Mars.1发行版(4.5.1)内部版本:20150924-1200

(btw is it the only way to include external jar libraries? is it good way to do it or does anyone has better solution?) (顺便说一句,这是包括外部jar库的唯一方法吗?是这样做的好方法还是有人有更好的解决方案?)

EDIT: The problem is resolved. 编辑:问题已解决。 I had to Launch (and build?) my Eclipse RCP Plugin with jar libraries (i thought that it doesnt have to be compiled but it is a config that just exist to describe libraries that are included). 我必须使用jar库启动(并构建?)我的Eclipse RCP插件(我认为它不必进行编译,但是它是一个用于描述所包含库的配置)。

In your plugin containing the jars you must list all the packages that other plugins can see in the 'Exported Packages' section on the 'Runtime' tab of the MANIFEST.MF editor. 在包含jar的插件中,您必须列出其他插件可以在MANIFEST.MF编辑器的“运行时”选项卡上的“导出的软件包”部分中看到的所有软件包。 You must also list the jars in the 'Classpath' section. 您还必须在“类路径”部分列出这些罐子。

The jars should be in the plugin and must also be listed in the 'build.properties' so that they are included in the RCP build. 罐子应该在插件中,并且还必须在“ build.properties”中列出,以便将它们包含在RCP版本中。 You should not have to set anything in the Java Build Path. 您不必在Java构建路径中进行任何设置。

Here is an example of how the 'Runtime' tab should look: 这是“运行时”标签外观的示例: 运行时选项卡

Here I have 4 jars in a 'lib' directory with lots of exported packages. 在这里,我在'lib'目录中有4个jar,其中包含许多导出的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM