Error when running an applet with WebStart.

I write this code for a jnlp archive


<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for TumbleItem -->
<jnlp
  spec="1.0+"
  codebase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\"
  href="nissan350.jnlp">
  <information>
    <title>Car conf</title>
    <vendor>Tridimens 3D SL</vendor>
    <homepage href="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"/>
    <description>Car configurator</description>
    <description kind="short">A car configurator.</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security> 
  <resources>
    <j2se version="1.5+"/>
    <jar href="On3.jar" download="lazy"/>
    <jar href="javazoom.jar" download="lazy"/>
    <jar href="gluegen-rt.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-i586.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-amd64.jar" download="lazy"/>
    <jar href="jogl-natives-windows-i586.jar" download="lazy"/>
    <jar href="jogl-natives-windows-amd64.jar" download="lazy"/>
    <jar href="TimingFramework.jar" download="lazy"/>
    <jar href="On3viewer.jar" download="lazy"/>
    <jar href="jogl.jar" main="true"/>
  </resources>
  <applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
      >
    <param name="subapplet.classname" VALUE="On3viewer.On3viewer"> 
    <param name="opengl" value="TRUE">
    <param name="On3File" value="login.on3">
    <param name="progressbar" value="true">
    <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,On3viewer.jar">
    <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar:preload,On3viewer.jar:preload">
  </applet-desc>
</jnlp> 

And when I run, I get this error:

What’s wrong???

As far as I can tell you have a null archive tag, which the JOGLAppletLauncher is looking for.

I trying to execute with the archive tag in two ways and none of them does work

First of them:


<applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
      >
    <param name="archive" value="files...">
    <param name="subapplet.classname" VALUE="On3viewer.On3viewer"> 
    <param name="opengl" value="TRUE">
    <param name="On3File" value="login.on3">
    <param name="progressbar" value="true">
    <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,On3viewer.jar">
    <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar:preload,On3viewer.jar:preload">
  </applet-desc>

Returns in console:

“Init failed: Missing subapplet.classname argument”

:o

That is the second parameter ¿?

If I put the parameter subapplet.classname before the parameter archive, it returns to me the same error than yesterday

The second way is


<applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
     archive="files..."
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
   
      >


But it returns same exception than yesterday.

Nobody has deployed with jnlp an applet with JOGL?

Thomas Ng from the Java Web Start team and I looked through the associated Java Web Start code and as far as we can tell specifying the “archive” tag as a sub-param to the applet-desc tag (the first way you mentioned) should work.

To be honest the applet-desc tag hasn’t been used much to date. However, some work going on may change that in the future.

In the interim, if you want to try hacking the JOGLAppletLauncher to see if you can pass down the needed information under another parameter name, I’ll be glad to put back those changes. It isn’t that hard to get the JOGL build process set up, and I’d be happy to answer questions.

The saddest thing Is I begun to write jnlp because the impossibility to modify heap size automatically . Now I need some other things too. But the fact, that there is not way to achieve this thing (modify by an applet parameter heap size - wih a limit to avoid nobody can write 100.000 MB-) is a truly problem in my opinion for applets having a big success. Users might not need making nothing and 64MB is a ridiculous limit for multimedia apps like I want to do. I think applets running into the browser (not out the browser because the memory limit) is an important thing.

I completely agree with you and am currently working to resolve this limitation with applets.

In the interim I suggest you use a Java Web Start application as a workaround. There are more drastic workarounds I can detail to you, but they involve platform-specific code and have limitations such as not supporting LiveConnect. Contact me via email at kbr at dev dot java dot net if you would like more information about the latter.

I cannot believe it! I have almost started it by modifying some things.

I forgot to say that because I’m a newbie in jnlp, (and in Java too) I didn’t know that having different signs in each jar into a jnlp could be problematic. The solution is putting jars in different jnlp and referencing between them as extensions. Doing this my standpoint was I described before. I have climbed another hill only by writing a “/” before “>” in each parameter ;D ??? :-\


<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for TumbleItem -->
<jnlp
  spec="1.0+"
  codebase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet"
  href="nissan350.jnlp">
  <information>
    <title>Car conf</title>
    <vendor>Tridimens 3D SL</vendor>
    <homepage href="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"/>
    <description>Car configurator</description>
    <description kind="short">A car configurator.</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security> 
  <resources>
    <j2se version="1.5+"/>
    <extension name="On3" href="On3.jnlp"/>
    <extension name="javazoom" href="javazoom.jnlp"/>
    <jar href="gluegen-rt.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-i586.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-amd64.jar" download="lazy"/>
    <jar href="jogl-natives-windows-i586.jar" download="lazy"/>
    <jar href="jogl-natives-windows-amd64.jar" download="lazy"/>
    <extension name="TimingFramework" href="TimingFramework.jnlp"/>
    <extension name="viewer" href="viewer.jnlp"/>
    <jar href="jogl.jar" main="true"/>
  </resources>
  <applet-desc
      documentBase="file://c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
      
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
      
      >
    <param name="archive" value="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,viewer.jar"/>
    <param name="subapplet.classname" value="On3viewer.class"/> 
    <param name="opengl" value="TRUE"/>
    <param name="On3File" value="login.on3"/>
    <param name="progressbar" value="true"/>
    <param name="cache_archive" value="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,viewer.jar"/>
    <param name="cache_archive_ex" value="gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar;preload,jogl.jar;preload,viewer.jar;preload"/>
  </applet-desc>


The message now is : Error: Start failed: class not found : On3viewer.class. This class is in viewer.jar that is linked by viewer.jnlp. Can I refer viewer.jar in params archive,cache_archive, and so on?

Any idea???

I am almost in the end.

You shouldn’t have the “.class” suffix in your sub-applet class name. It should just be “On3viewer”.

Thanks Ken. By removing the extension and packaging one more time one of the jars, I have got success.