我有一个可以工作的JDT插件,它接受运行时参数(到目前为止,我一直在传递eclipse运行时参数)
现在,我需要将其导出为jar,以便其他人也可以使用它。
我使用Export->Deployable Plugins and Fragments将其导出到特定目录。
当我试图从我的cmd执行这个jar文件时,它给出了错误:
无主要清单属性,在testPlugin_1.0.0.jar中
有人能帮我从命令行运行这个jar吗?PS:插件项目有一个manifest.xml,如下所示:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: TestPlugin Plug-in
Bundle-SymbolicName: testPlugin; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.codechanger.ResourceCloseActivator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding,
org.eclipse.ant.core,
org.eclipse.jdt,
org.eclipse.jdt.core,
org.eclipse.core.resources,
org.eclipse.jface.text,
org.eclipse.jface.databinding
Eclipse-LazyStart: true
谷歌说jar应该有一个带有主类的Manifest.xml,但我的JDT插件是在我使用osgi框架运行时由start方法触发的,而不是主类。
发布于 2016-02-17 11:34:50
您不能直接从命令行运行插件,您必须将其安装到Eclipse中并运行Eclipse,或者编写一个具有GUI的富客户端程序(RCP)来运行您的代码。
您可以通过在用于启动Eclipse的命令行中指定参数来传递程序的参数。
https://stackoverflow.com/questions/35455357
复制相似问题