jogl 1.1.1 vs 2.0 jnlp applet

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

jogl 1.1.1 vs 2.0 jnlp applet

Petr Skramovsky
Hi guys,

Im working on online map application which is using jogl( 1.1.1 ) jnlp applet for map rendering... it worked pretty well but it  stopped working with java jre update 21 ( main class not found exception ). I read that many people had the same problem,  and I didn't find anybody to solve it. I started to use jogl 2.0, applet itself is running with u21 but seems buggy ( linux is crashing in nativewindow.so and pthreads.so, viewport does work properly, on vista some ogl ex function was not found... :/) so i would like to stay with 1.1.1 atm. Do you have any idea how to solve that main class error?

Thanks for reply Petr Skramovsky.
Reply | Threaded
Open this post in threaded view
|

Re: jogl 1.1.1 vs 2.0 jnlp applet

gouessej
Administrator
Hi!

Can you be more precise concerning "main class not found exception"?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl 1.1.1 vs 2.0 jnlp applet

Petr Skramovsky
Hi,

I'm sorry for my vague description. More details...

Here is my applet :
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
        width="100%"
        height="100%"
        codebase="."
        archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
                  http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
                  http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.mo.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.map.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.gl.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.common.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.tracking.jar,
                  build/5c3a5dba235e2f70fab2e5905f65956afa8171b9/mpfc.localisation.jar"> 
    <param name="codebase_lookup"       value="false">
    <param name="noddraw.check"         value="false">
    <param name="progressbar"           value="true">
    <param name="jnlpNumExtensions"     value="1">
    <param name="jnlpExtension1"        value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
    <param name="noddraw.check"         value="true">
    <param name="noddraw.check.silent"  value="true">
    <param name="separate_jvm"          value="true">
    <param name="java_arguments"        value="-Xmx256m -Dsun.java2d.noddraw=true">
    <param name="subapplet.classname"   value="mpfc.mo.MOApplet">
    <param name="subapplet.displayname" value="MapsOnline">
    <param name="version"               value="1.0.15.0" >
</applet>
Exception with jre6u21:
java.lang.ClassNotFoundException: mpfc.mo.MOApplet
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1914)
        at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:658)
        at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1269)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
People with similar problems:
Reply | Threaded
Open this post in threaded view
|

Re: jogl 1.1.1 vs 2.0 jnlp applet

gouessej
Administrator
He gives the solution:
http://forum.processing.org/topic/is-jre-6-update-21-working-with-processing-applet

It does not come from JOGL but from changes in the way Java Web Start loads unsigned JARs.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl 1.1.1 vs 2.0 jnlp applet

Petr Skramovsky
Hi,

You are right, i'm dumb i didn't try that, now it's working pretty well again. Problem was webstart itself as you said, imho it wasn't caused by unsigned jars( btw all of my jars are signed ), it started working after i put all applet stuff to .jnlp file, but it didn't work in IE so i changed classic html applet creation to javascript deploy and also deteled deploy cache (%appdata%\..\LocalLow\Sun\Java\Deployment\cache).

Thanks for help, best regards Petr Skramovsky.

My Applet:
<script src="http://www.java.com/js/deployJava.js" language="javascript" type="text/javascript"></script><script language="javascript" type="text/javascript"> var attributes = { code:'mpfc.mo.MOApplet', width:'100%', height:'100%' }; var parameters = { jnlp_href: 'mo.jnlp' } ; deployJava.runApplet( attributes, parameters, '1.6' ); </script>
JNLP file :
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="6.0+" codebase="" href="mo.jnlp">
  <information>
    <title>MapsOnline</title>
    <vendor>MapFactor</vendor>
    <homepage href="https://mo.mapfactor.com"/>
    <description>Online Tracking System</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="always" policy="always"/>
  <resources>
    <j2se version="1.6+" initial-heap-size="128m" max-heap-size="256m" />
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.mo.jar" main="true"/>
    <extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.gl.jar"/>
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.map.jar"/>
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.common.jar"/>
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.tracking.jar"/>
    <jar href="build/16bf58d2fa4bdbf8a66dfd1a5afb9657adde7b1a/mpfc.localisation.jar"/>
    <property name="sun.awt.noerasebackground" value="true"/> 
    <property name="sun.awt.erasebackgroundonresize" value="true"/> 
    <property name="sun.java2d.noddraw" value="true"/> 
  </resources>
  <applet-desc  
    main-class="mpfc.mo.MOApplet"
    name="MOApplet"
    width="800"
    height="600">
  </applet-desc>
</jnlp>