Author Topic: New LWJGL 2.0 Beta 1 AppletLoader problem and workaround  (Read 2871 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
New LWJGL 2.0 Beta 1 AppletLoader problem and workaround
« on: May 17, 2008, 03:40:40 pm »
The new LWJGL 2.0 Beta 1 was released on April 20, 2008.  As you all probably know, jPCT uses LWJGL for the hardware rendering mode, and in an applet this generally requires using LWJGL's AppletLoader.

Then biggest change in this release (from an AppletLoader perspective) is that it now has support for lzma and pack200.  I had some time today to work with the new AppletLoader.  Usage is similar to previous releases, but most of the files have been changed from JAR's to LZMA's.  There is a problem, though.  If you try loading an applet over the internet with it, you will receive the following error:
Fatal error occured (4): Could not verify signing in resource: lwjgl.jar.pack.lzma

The problem is not mentioned in the included documentation, and the bundle does not come with JAR's to use instead of the LZMA's.  I posted the problem on the LWJGL forums, and was informed that it is related to the following bug:

Until this bug is fixed, you can use the following work-around:

1) Create a text file named ".htaccess".
If you are running Windows, it will complain, because that is not a valid filename, according to Bill.  You'll have to name it something like ".htaccess.txt", then rename it later after uploading it.

2) Edit the file you created with a text editor, like notepad.  Add the line:
AddType application/x-lzma .lzma

3) Save your file, and FTP it to wherever lwjgl_util_applet.jar and lzma.jar are located.  If necessary, rename your file ".htaccess" (remove the ".txt" extension)
Make sure you are allowed to use .htaccess before doing this!  Some of the things that .htaccess is able to do can compromise a server configuration.  For this reason, some web hosting companies may require them to be set up by an admin, so don't get in trouble.  You should CHMOD your .htaccess file to 644 (RW-R--R--) to prevent people from messing with it

That's it.  Hope you find this helpful!