Security problem (?) with jME applets, can't get them to work

I've really been trying this for days, but I can't figure it out. I've managed to kind of isolate the problem. When I try to run my applet I get the following error (in the terminal if I run appletviewer or in the java Console if I run in the browser)



13-jul-2009 19:44:35 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
java.lang.ExceptionInInitializerError
   at org.lwjgl.Sys.createImplementation(Sys.java:109)
   at org.lwjgl.Sys.<clinit>(Sys.java:97)
   at org.lwjgl.opengl.AWTGLCanvas.<clinit>(AWTGLCanvas.java:84)
   at com.jmex.awt.lwjgl.LWJGLAWTCanvasConstructor.makeCanvas(LWJGLAWTCanvasConstructor.java:45)
   at com.jmex.awt.lwjgl.LWJGLAWTCanvasConstructor.makeCanvas(LWJGLAWTCanvasConstructor.java:42)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.createCanvas(LWJGLDisplaySystem.java:212)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.createCanvas(LWJGLDisplaySystem.java:189)
   at com.jmex.awt.applet.SimpleJMEApplet.init(SimpleJMEApplet.java:156)
   at sun.applet.AppletPanel.run(AppletPanel.java:380)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.lwjgl.util.Debug read)
   at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
   at java.security.AccessController.checkPermission(AccessController.java:427)
   at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
   at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
   at java.lang.System.getProperty(System.java:628)
   at java.lang.Boolean.getBoolean(Boolean.java:221)
   at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:451)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(LWJGLUtil.java:449)
   at org.lwjgl.LWJGLUtil.<clinit>(LWJGLUtil.java:268)
   ... 10 more



My code is the following, contains hardly anything to assure this can't be the problem:


package applettest;

import com.jmex.awt.applet.SimpleJMEApplet;


public class AppletTestBoxColor extends SimpleJMEApplet {

   public void simpleAppletSetup() {
      getLightState().setEnabled(false);
   }
   
   public void simpleAppletUpdate() {
   }

}



I'm running linux, here's what I do to compile and run:


corien@Ubuntu-Corien:$ ls -R
.:
applet.html  applettest  Copyright.txt  jME_2.0.jar  lib  __MACOSX  properties.cfg  README.TXT  run_jME.bat  run_jME.sh  TestBox.java~  test.jar

./applettest:
AppletTestBoxColor.class  AppletTestBoxColor.java

./lib:
gluegen-rt.jar  jinput.jar  jogl.jar  jorbis-0.0.17.jar  lwjgl.jar  lwjgl_util_applet.jar  lwjgl_util.jar  natives  swt.jar

./lib/natives:
jinput-dx8.dll  libjinput-linux64.so  libjinput-osx.jnilib  liblwjgl.jnilib  libodejava64.so    libodejava.so   libopenal.so  odejava.dll   openal.dylib
jinput-raw.dll  libjinput-linux.so    liblwjgl64.so         liblwjgl.so      libodejava.jnilib  libopenal64.so  lwjgl.dll     OpenAL32.dll

./__MACOSX:
lib

./__MACOSX/lib:
natives

./__MACOSX/lib/natives:
corien@Ubuntu-Corien:$ javac -classpath .:jME_2.0.jar applettest/AppletTestBoxColor.java
corien@Ubuntu-Corien:$ jar cf test.jar applettest/AppletTestBoxColor.class
corien@Ubuntu-Corien:$ jarsigner -keystore ~/.keystore -storepass password -keypass password test.jar tradeandconquer

Warning: The signer certificate will expire within six months.
corien@Ubuntu-Corien:$ jarsigner -verify -certs test.jar
jar verified.
corien@Ubuntu-Corien:~/towerwarscrap/towerwarscrap2$ appletviewer applet.html


and then I get the error. Does anyone have any idea what could be wrong?

for a solution just google for java applet ressource permission

I did, but it doesn't lead anywhere. This wasn't very helpfull.



I've been seriously trying this, and have put serious effort in posting my question. A serious answer would be nice.



If I can get this to work I will write a noob-proof tutorial on getting applets to work in the wiki, I think it is needed.

Did you sign jme2.0 jar as well? As far as I know every used jar has to be signed.



I found it quite useful to have a look here:



http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/applet

I signed all the jars, but that didn't help.



The documentation you pointed to has been deprecated, it points to new documentation, but after some googling (because I couldn't figure that one out either) it turns out the new documentation has been deprecated as well :(.

NOTE: The old LWJGLInstaller has been deprecated. The documentation has been moved here.


That does not mean that the document is deprecated.... As long your jME-Code is ok this should lead you to your goal. That is all I can say to this. Have fun and be sure to follow each step....

Is the lwjgl,jar signed as well ? it seems the AccessControlException comes from lwjgl.

Instead of using SimpleJMEApplet, you might want to use the newer SimpleApplet.