Hello Guest

LWJGLInstaller & LWJGL Applets

  • 7 Replies
  • 20747 Views
*

Offline AGP

  • **
  • 51
LWJGLInstaller & LWJGL Applets
« on: April 15, 2009, 00:40:50 »
Is LWJGLInstaller not even included with 2.1 (as opposed to just being deprecated)? Because it seems to me to be MUCH simpler than the new method you're suggesting for hardware access into applets. To be honest, I don't really get the new system (the Wiki explanation is confusing). The following is my html file. Is there something I missed (I'm sure there is)? sGame, by the way, is the signed jar. I figured al_main would reference sGame.Game (the main class in the sGame jar).

<html>
  <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="." width="640" height="480">
    <param name="al_title" value="Game v. 1.0">
    <param name="al_main" value="sGame.Game">
    <!-- logo to paint while loading, will be centered -->
    <param name="al_logo" value="Mouse0.gif">
    <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done -->
    <param name="al_progressbar" value="appletprogress.gif">
   
    <!-- signed windows natives jar in a jar -->
    <param name="al_windows" value="windows_natives.jar.lzma">

    <!-- List of Jars to add to classpath -->
    <param name="al_jars" value="sGame.jar, lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma, res.jar.lzma">
   
    <!-- signed linux natives jar in a jar -->
    <param name="al_linux" value="linux_natives.jar.lzma">
   
    <!-- signed mac osx natives jar in a jar -->
    <param name="al_mac" value="macosx_natives.jar.lzma">

    <!-- signed solaris natives jar in a jar -->
    <param name="al_solaris" value="solaris_natives.jar.lzma">
   
    <!-- Tags under here are optional -->
   
    <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float -->
    <!-- <param name="al_version" value="0.1"> -->
   
    <!-- background color to paint with, defaults to white -->
    <!-- <param name="al_bgcolor" value="000000"> -->
   
    <!-- foreground color to paint with, defaults to black -->
    <!-- <param name="al_fgcolor" value="ffffff"> -->
   
    <!-- error color to paint with, defaults to red -->
    <!-- <param name="al_errorcolor" value="ff0000"> -->
   
    <!-- whether to run in debug mode -->
    <!-- <param name="al_debug" value="true"> -->
   
    <!-- whether to prepend host to cache path - defaults to true -->
    <param name="al_prepend_host" value="false">

  </applet>

  <p>
    if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process.
  </p>

  </body>
</html>

*

Offline kappa

  • *****
  • 1319
Re: LWJGLInstaller & LWJGL Applets
« Reply #1 on: April 15, 2009, 06:00:22 »
Alot has changed since LWJGL use to use LWJGLInstaller and AWTGLCanvas for applets, now AppletLoader.jar is used to deploy applets and Display.setParent() instead of AWTGLCanvas.

The AppletLoader is controlled entirely by html and will download your jars and the appropriate natives jar for your platforms, extract your natives and added the classpath for the jars and natives for you while at the same time displaying a nice progress bar as it all happens.

The html file you paste below looks correct, what seems to be the problem you are having?

p.s. feel free to drop in at #lwjgl irc.freenode.net if you need some further clarification.

*

Offline AGP

  • **
  • 51
Re: LWJGLInstaller & LWJGL Applets
« Reply #2 on: April 15, 2009, 16:42:03 »
In Firefox, I get an error number 4. In AppletViewer O get an "accept the permissions dialog to allow the applet to continue" message. And nothing ever pops up to as if it can run.

*

Offline AGP

  • **
  • 51
Re: LWJGLInstaller & LWJGL Applets
« Reply #3 on: April 15, 2009, 21:14:17 »
I'm running the JDK/JRE 1.6 Update 13 64 bits, if it means anything. And on 32-bit Firefox, the message is "Fatal error occurred (4): Unable to get input stream for lwjgl_applet.jar.pack (I have the lwjgl_applet.pack.lzma file in the applet directory but not the applet jar itself of course).

*

Offline kappa

  • *****
  • 1319
Re: LWJGLInstaller & LWJGL Applets
« Reply #4 on: April 15, 2009, 21:43:16 »
best bet would be to download the example lwjgl applet and see if that runs for you, if it does then theres probably something your doing wrong with your version.

http://kent.dl.sourceforge.net/sourceforge/java-game-lib/lwjgl_applet-2.1.0.zip

*

Offline AGP

  • **
  • 51
Re: LWJGLInstaller & LWJGL Applets
« Reply #5 on: April 15, 2009, 22:19:59 »
The example applet works. But the point is, I don't know what I'm doing wrong since you tell me that my html file is right.

*

Offline AGP

  • **
  • 51
Re: LWJGLInstaller & LWJGL Applets
« Reply #6 on: April 15, 2009, 22:47:00 »
Oddly enough a different applet goes as far as the "switching applet" message. But then the progress bar stops moving and nothing happens. And the appletviewer, I hadn't noticed, prints a access denied (PropertyPermission) error on the command prompt. How do I set appletviewer's permissions?

*

Offline AGP

  • **
  • 51
Re: LWJGLInstaller & LWJGL Applets
« Reply #7 on: April 16, 2009, 21:01:49 »
OK, 32-bit Firefox seems to work, now. So if anyone can just tell me how I can avoid the "access denied" error with appletviewer, I'd appreciate it.