我正在研究独立的无头 RCP。当我在 Eclipse IDE 中执行应用程序和产品时,它可以正常工作,但是当我导出并执行它时,我在日志文件中得到了这个错误。
!ENTRY org.eclipse.equinox.ds 4 0 2013-01-16 13:27:59.132
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.ds_1.4.0.v20120522-1841 [3]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
...
!ENTRY org.eclipse.equinox.ds 4 0 2013-01-16 13:28:00.901
!MESSAGE [SCR] Exception while activating instance org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager@6b8d6157 of component org.eclipse.e4.ui.css.swt.theme
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
参考这篇文章,我了解到我有一个更新版本的插件,没有它的依赖项,并且运行时路径有问题。但是,我不确定究竟是什么导致了这个错误。
可能有什么问题?为什么只有当我作为独立执行它时才会出现此错误?
添加
我有 build.properties 文件
output.. = bin/
bin.includes = META-INF/,\
plugin.xml,\
.
source.. = src/
这是 MANIFEST.MF 文件
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Refactorer
Bundle-SymbolicName: edu.utexas.seal.refactorer;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: edu.utexas.seal.refactorer.Activator
Bundle-Vendor: PROSSEEK
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.jdt;bundle-version="3.8.0",
org.eclipse.jdt.core;bundle-version="3.8.2",
org.eclipse.core.resources;bundle-version="3.8.1",
org.eclipse.text;bundle-version="3.5.200",
org.eclipse.jdt.ui;bundle-version="3.8.1",
org.eclipse.jdt.core.manipulation;bundle-version="1.5.0",
org.eclipse.ltk.ui.refactoring;bundle-version="3.7.0",
org.eclipse.jdt.core.manipulation;bundle-version="1.5.0",
org.eclipse.ltk.core.refactoring;bundle-version="3.6.0",
org.eclipse.jface.text;bundle-version="3.8.1",
org.eclipse.core.expressions;bundle-version="3.4.401",
org.eclipse.core.externaltools;bundle-version="1.0.100",
org.eclipse.jface;bundle-version="3.8.101",
edu.utexas.seal.utilities;bundle-version="1.0.0",
org.eclipse.core.filebuffers;bundle-version="3.5.200"
Bundle-ClassPath: .
Export-Package: edu.utexas.seal.refactorer
我只有一项:“。” 在捆绑类路径中。