JOGLAppletLauncher

I hope this is an easy one…

When I try to execute my applet, which is signed and jar’d, I receive a message “class not found” in my java console. I have played with many variations of the codebase value. All the file (html, jar) are in the same directory.

My applet class is not in a package.

<applet code="com.sun.opengl.util.JOGLAppletLauncher"
		width=800 height=600
		archive="jogl.jar,gluegen-rt.jar,worldwind.jar,BasicDemo.jar,DemoApplet.jar">
	<param name="subapplet.classname" VALUE="DemoApplet">
	<param name="subapplet.displayname" VALUE="WorldWind">
	<param name="progressbar" value="true">
	<param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,worldwind.jar,BasicDemo.jar,DemoApplet.jar">
	<param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegen-rt.jar;preload,worldwind.jar;preload,BasicDemo.jar;preload,DemoApplet.jar;preload">
</applet>

A second question - some folks over on the NASA Worldwind list have suggested using JNLPAppletLauncher instead. Could anyone point me to pros/cons?

Appreciate your help…!

Verify with jar tvf that your DemoApplet.jar contains DemoApplet.class at the top level. If it does, please post the entire exception stack trace.

The JNLPAppletLauncher is a substantial revision of the JOGLAppletLauncher and is now the recommended way to deploy JOGL-based applets. I will be removing the JOGLAppletLauncher from the JOGL source tree at some point in the future so please switch over.

Thanks! I just switched to the JNLPAppletLauncher based on similar advice on the Worldwind site.

I can run the JNLP gears demo just fine - I just and paste the text near the bottom of http://applet-launcher.dev.java.net into a local file, read into browser, and walla.

However, when I edit the archive and subapplet.classname tags to call a local jar file, I get the class not found error.

The path in the archive argument needs to be absolute. In this case, how would I construct the URL?


 <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=600
      height=400
      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,
               http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl-demos.jar,
               file:///var/www/html/BasicDemo.jar,
               file:///var/www/html/worldwind.jar,
               file:///var/www/html/DemoApplet.jar">
   <param name="codebase_lookup" value="false">
   <param name="subapplet.classname" value="DemoApplet">
   <param name="subapplet.displayname" value="My Test">
   <param name="noddraw.check" value="true">
   <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">
 </applet>

I have tried every variation of the path except, it would seem, the correct one.

I appreciate your help.

                -Rogene

You can use relative URLs in your archive tag; they are relative to the codebase, which is inferred by the plugin and/or web browser, if it isn’t specified, as the directory containing the web page.

Thanks, Ken. I knew this was true for JOGL-AL but thought I was limited to absolute paths when using JNLP-AL.

Are you aware of any memory/cache limitations in loading a number of jars on the archive line? Or I suppose a more useful question would be, how do most people monitor memory use in browsers to profile for leaks, etc.

Cheers!

You’ll probably need to get a tool such as JProfiler and modify the JVM command line arguments using the Java Control Panel to allow attaching it on demand to the JVM in the web browser process.