问题描述
我想在eclipse中编写一个插件,当活动窗口更改时,该插件将活动窗口标题发送到端口.为此,我必须将jna和jna-platform-win32库添加到我的插件中.这个库增加了编译时间,但是当我想在运行时使用它们时,库却无法正常工作.如何在Eclipse中解决此问题?
I want to write a plugin in eclipse that sends active window title to a port when active window changes. For this purpose I have to add jna and jna-platform-win32 libraries to my plugin. This libraries add in compile time but when I want to use them in run time libraries not worked. How can I solve this problem in eclipse?
推荐答案
您必须将罐子添加到插件MANIFEST.MF中的 Bundle-Classpath
中,并将其包括在'build.properties中'文件,以便它们包含在插件版本中.
You must add the jars to the Bundle-Classpath
in the plugin MANIFEST.MF and also include them in the 'build.properties' file so they are included in the plugin build.
要添加到 Bundle-Classpath
中,请打开plugin.xml编辑器,然后转到运行时"标签.将罐子添加到类路径"部分(对于普通的插件类,您还应该有一个."条目).
To add to the Bundle-Classpath
open the plugin.xml editor and go to the 'Runtime' tab. Add the jars to the 'Classpath' section (you should also have a '.' entry for your normal plugin classes).
plugin.xml编辑器的构建"选项卡更新了build.properties文件,因此请确保在二进制构建"部分中选中了jar.
The 'Build' tab of the plugin.xml editor updates the build.properties file so make sure the jars are checked in the Binary Build section.
这篇关于如何将jar文件添加到eclipse插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!