如何修复eclipse警告:“建议插件”XXX“从JAR运行,指定”unpack =“false”属性" [英] How do I fix eclipse warning: "It is recommended for plug-in 'XXX' to run from a JAR, specify 'unpack="false"' attribute"

查看:142
本文介绍了如何修复eclipse警告:“建议插件”XXX“从JAR运行,指定”unpack =“false”属性"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

插件真的需要解包,是的,我知道它不应该在乎,但它是。我只想让这个警告消失,我该怎么做?

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?

推荐答案

尝试设置 -ClassPath 在您的清单。

此标题告诉OSGi您的包中找到的类。如果没有指定,默认值为,这意味着您的捆绑包的根。

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基于这个警告是否认为你的包应该是一个jar。决定的其中一件事就是Bundle-ClassPath是否包含。 (在一个文件夹形状的bundle中,这意味着根文件夹中的.class文件而不是jar)。

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).

例如,bundle org.eclipse.pde.build船只作为文件夹,所有的类文件都在嵌套的jar中,它有 Bundle-ClassPath:pdebuild.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

如果你不包含任何类文件,并且没有嵌套的jar,你可能只需要在你的bundle中指定一些任意的文件夹。

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

这篇关于如何修复eclipse警告:“建议插件”XXX“从JAR运行,指定”unpack =“false”属性"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆