将jar添加到Eclipse PlugIn [英] Adding jars to a Eclipse PlugIn
本文介绍了将jar添加到Eclipse PlugIn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图构建一个Eclipse插件,它必须使用一个依赖于其他jar的自写式jar,但是我不知道从哪里开始处理jars作为单独的PlugIns。在任何地方我只需要使用.jar文件或我错了?
I try to build a Eclipse plugin that has to use a self written jar which is dependent on other jars, but I don't get the point where to start with handling jars as seperate PlugIns. Anywhere I have to use just the .jar files or am I wrong?
推荐答案
我想我找到了一个正确的解决方案;诀窍是你必须通过Eclipse实现所有的文件。我将这个解决方案复制到news.eclipse.platform中:
I think I found a proper solution; the trick is that you have to implement all the files via Eclipse. I just copy here the solution which was posted to news.eclipse.platform:
将jar包含在插件中: / p>
Include the jars in a plugin:
- 使用导入>文件系统将jar文件导入插件项目, / lib目录。
- 使用Add ...将jar添加到plugin.xml> Runtime选项卡的classpath部分。
- 使用新建...添加。确保您的二进制构建在plugin.xml> Build选项卡上导出新的jar文件。
- 在项目中保存
- ,使用上下文菜单> PDE工具>更新类路径来正确地将jar添加到eclipse项目类路径。
- Use Import>File System to import the jar files into your plugin project, say in the /lib directory.
- Use "Add..." to add the jars to the classpath section of the plugin.xml>Runtime tab.
- Use "New..." to add "." library back (with no quotes, of course).
- make sure your binary build exports the new jar files on the plugin.xml>Build tab.
- save
- on the project, use context menu>PDE Tools>Update Classpath to correctly add the jars to the eclipse project classpath.
这篇关于将jar添加到Eclipse PlugIn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文