我尝试使用 jnlp 启动我的 RCP 项目。所以我实施了一个小型的 e4-RCP 项目。从产品开始不会造成任何问题。该应用程序应该工作得很好。我安装了一个运行在 localhost:8080 的 tomcat 服务器,这也启动得很好。比我为该应用程序编写了一个 jnlp 文件。导出并签署 jar。当我尝试启动应用程序时。作为http://localhost:8080/webstart.jnlp我得到了异常:
java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at de.checkpoint.webstart.WebstartLauncher.main(WebstartLauncher.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
说了这么多,下面是我的主要内容:
包 de.checkpoint.webstart;
import org.eclipse.equinox.launcher.WebStartMain;
public class WebstartLauncher {
public static void main(String[] args) {
WebStartMain.main(args);
}
}
这是我的 jnlp 文件:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="webstart.jnlp">
<information>
<title>Jnlp Webstart Test</title>
<vendor>Boris Nguema B.</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Webstart</description>
</information>
<security>
<all-permissions/>
</security>
<!-- <property name="eclipse.product" value="de.checkpoint.product"/> -->
<!-- <property name="osgi.frameworkParentClassloader" value="current"/> -->
<!-- <property name="jnlp.osgi.parentClassloader" value="current"/> -->
<resources>
<j2se version="1.8+" />
<jar href="de.checkpoint.start_1.0.0.201711041646.jar" />
</resources>
<application-desc main-class="de.checkpoint.webstart.WebstartLauncher" />
</jnlp>
谁能告诉我,我错过了什么?