"Adding lib/my.jar meant the plugin will always be a directory instead of a jar (eclipse doesn't load jars from withing jars). By default, my plugin itself shows up as the "." library, which isn't included in a directory plugin that includes other jars."
因此需要将类似包含第三方jar包的插件导出成文件夹的形式,具体步骤如下。打开feature.xml文件,在功能编辑器的"Plug-ins"Tab页,选中想要配置的插件,并在"Plug-in Details"面板中,选中"Unpack the plug-ins archive after the installation",这样在插件安装后会将插件解压成文件夹形式。
按Ctrl+N,在新建对话框里选择"Plug-in from existing JAR archives",按下一步选择你需要的jar文件。 ? 再下一步指定这个plugin的名称,注意这一步里一般要把最下面的"Unzip the JAR archives into the project"选项清除,否则eclipse会把jar文件全部展开为.class文件树,最后按Finish就可以了。