今天我开始尝试使用 JxBrowser。使用 public static main启动示例按预期工作(它可以找到 license.jar)。
我在视图中添加了一个按钮来启动示例:
btnStart.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
new JxBrowserJavaFXSWT();
}
});
现在我收到:
Caused by: java.lang.RuntimeException: JxBrowser license check failed: No valid license found.
这实际上很奇怪,因为它添加了类路径。我尝试添加一个新的插件项目(加载正常)并将 license.jar 添加到其类路径:不起作用。我试图将它添加到 manifest.mf、build.properties
清单文件
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: License
Bundle-SymbolicName: com.teamdev.jxbrowser.license
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.teamdev.jxbrowser.license.Activator
Bundle-Vendor: TEAMDEV
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
build.properties
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
license.jar
src.includes = license.jar
jars.extra.classpath = license.jar
问题:有没有办法将 license.jar 添加到我的 rcp 项目和/或我缺少什么?
PS:如果缺少信息来帮助我解决这个问题,我很乐意添加更多代码等