Lycone
Lycone

Reputation: 650

java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain

I try to launch my RCP-project with jnlp. So i implemented a small e4-RCP project. Starting with the product doesn't cause any problem. The application supposedly works just fine. I installed a tomcat server running at localhost:8080, this also starts very well. Than i wrote a jnlp file for the app. exported and signed the jar. When i try to start the app. as http://localhost:8080/webstart.jnlp i get the exception:

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)

Having said all all of that, here is my main:

package de.checkpoint.webstart;

import org.eclipse.equinox.launcher.WebStartMain;

public class WebstartLauncher {

    public static void main(String[] args) {

        WebStartMain.main(args);
    }

}

Here is my jnlp file:

<?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>

Can anyone tells me, what am I missing?

Upvotes: 0

Views: 838

Answers (1)

docDevil
docDevil

Reputation: 82

I am not sure if you already found out the problem,but equinox launcher do not have those lines in the manifest:

Permissions: all-permissions

Codebase: *

Trusted-Only: true

you need to add them and sign.

Upvotes: 1

Related Questions