How do I fix eclipse warning: “It is recommended for plug-in 'XXX' to run from a JAR, specify 'unpack=”false“' attribute”

末鹿安然 提交于 2019-12-10 17:54:24

问题


The plug-in really needs to be unpacked, yes I know it shouldn't care, but it does. I just want to make this warning go away, how do I do that?


回答1:


Try setting Bundle-ClassPath in your manifest.

This header tells OSGi where in your bundle to find the classes. If not specified, the default value is ".", which means the root of your bundle.

PDE/UI is basing this warning on whether or not it thinks your bundle should be a jar. One of the things it bases the decision on is whether or not the Bundle-ClassPath contains ".". (In a folder shaped bundle, this would mean .class files in the root folder instead of a jar).

For example, the bundle org.eclipse.pde.build ships as a folder, all the class files are in nested jars, and it has Bundle-ClassPath: pdebuild.jar

If you don't contain any class files, and have no nested jars, you could probably just specify some arbitrary folder in your bundle.



来源:https://stackoverflow.com/questions/951845/how-do-i-fix-eclipse-warning-it-is-recommended-for-plug-in-xxx-to-run-from-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!