如何在 MANIFEST.MF 文件中正确包含 org.json.jar 和 org.json.* 导入?我正在使用JDeveloper IDE我的PhillPlugin.classjava 文件导入以下内容:org.json.JSONObjectorg.json.JSONException我还在org.json.jar我的库中导入了文件我将所有这些合并到一个最终.jar文件中这是我的MANIFEST.MF文件Manifest-Version: 1.0Bundle-Version: 10Bundle-Name: PhillPluginBundle-Activator: phillplugin.PhillPluginBundle-ManifestVersion: 2Import-Package: org.osgi.framework;version="1.3.0",oracle.security.am.plugin,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl,oracle.security.am.plugin.api,oracle.security.am.common.utilities.principal,oracle.security.idm,javax.security.authBundle-SymbolicName: PhillPluginClass-Path: felix.jar, identitystore.jar, oam-plugin.jar, utilities.jar, org.json.jar我已经包括org.json.jar在Class-Path条目中我如何在入境时包括进口Import-Package?
1 回答
皈依舞
TA贡献1851条经验 获得超3个赞
org.json应该导入Import-Package.
像这样org.json;resolution:= optional,org.json.JSONObject;resolution:=optional
这是我的清单:
Manifest-Version: 1.0
Bundle-SymbolicName: PhillPlugin
Bundle-Version: 10
Bundle-Name: PhillPlugin
Bundle-Activator: phillplugin.PhillPlugin
Bundle-ManifestVersion: 2
Import-Package: org.osgi.framework;version="1.3.0",oracle.security.am.
plugin,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl
,oracle.security.am.plugin.api,oracle.security.am.common.utilities.pr
incipal,oracle.security.idm,javax.security.auth,org.json;resolution:=
optional,org.json.JSONObject;resolution:=optional
添加回答
举报
0/150
提交
取消