SimpleJMEApplet tutorial problem

Hello guys, I’ve been trying to run a SimpleJMEApplet example in my browser, I used this tutorial… The example runs fine on NetBeans, but when I try to run it on browser (either firefox or IE), I get this error:

18/10/2010 07:54:39 com.jme.system.lwjgl.LWJGLDisplaySystem

INFO: LWJGL Display System created.

Exception in thread “thread applet-br.unisc.AppletTestBoxColor-1” java.lang.ExceptionInInitializerError

at org.lwjgl.Sys.createImplementation(

at org.lwjgl.Sys.(

at org.lwjgl.opengl.AWTGLCanvas.(

at com.jmex.awt.lwjgl.LWJGLAWTCanvasConstructor.makeCanvas(

at com.jmex.awt.lwjgl.LWJGLAWTCanvasConstructor.makeCanvas(

at com.jme.system.lwjgl.LWJGLDisplaySystem.createCanvas(

at com.jme.system.lwjgl.LWJGLDisplaySystem.createCanvas(

at com.jmex.awt.applet.SimpleJMEApplet.init(

at sun.plugin2.applet.Plugin2Manager$ Source)

at Source)

Caused by: access denied (java.util.PropertyPermission org.lwjgl.util.Debug read)

at Source)

at Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

at java.lang.System.getProperty(Unknown Source)

at java.lang.Boolean.getBoolean(Unknown Source)

at org.lwjgl.LWJGLUtil$

at Method)

at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(

at org.lwjgl.LWJGLUtil.(

… 10 more

I use this html file:



head> Meu Applet /head>


h1>MyApplet Page/h1>





width=“800” height=“600”>

param name=“useAppletCanvasSize” value=“true”/>






then I have the AppletTestBoxColor.class file inside the br/unisc/ directory

and all the JARs mentioned in the ‘archive’ parameter in the same folder of the html file…

That error just implies that your jars are not signed properly. As they are not signed the permissions to the jme jars are denied by java and hence you get the above error.

Also AWTGLCanvas used above is very old way to run lwjgl applets, pretty sure there another class somewhere in JME that uses the new Display.setParent method to run applets.

1 Like

i already signed the ‘signedgame.jar’ (the jar where my applet is)… so, I dont think that’s the reason… :confused:

I will look into Display.setParent…

Theres new security settings in WebStart now, you will have to use lwjgl 2.5 and the supplied Applet Harness.

1 Like
normen said:
Theres new security settings in WebStart now, you will have to use lwjgl 2.5 and the supplied Applet Harness.

hmmm, sorry for my silliness, but... how can I do it? X(
What is Applet Harness?
I'm not using webstart... Is that a problem?
I'm already using lwjgl 2.5
tauame said:
hmmm, sorry for my silliness, but... how can I do it? X(
What is Applet Harness?

I think he's referring to the LWJGL AppletLoader, there is a full tutorial on what it is and how to use it here.

hmmmmm thx, i will take a look over it, if it works, I tell u guys :wink:

hello again… I tried to fix my errors here. Well… i did, but the applet still not running and now it doesnt report any errors…

I’m using lwjgl 2.6 now, and I used the lwjgl AppletLoader. I also signed all my jars.

Here is what is happening: The applet loader loads the applet (it shows the applet loader loading screen) and when it finishes i just get a blank screen.

Here is the java console output:

Imagem carregada: file:/C:/Documents%20and%20Settings/Tauame/Meus%20documentos/NetBeansProjects/AppletGame/build/logo.png

Imagem carregada: file:/C:/Documents%20and%20Settings/Tauame/Meus%20documentos/NetBeansProjects/AppletGame/build/barraprogresso.gif

21/10/2010 10:30:41 com.jme.system.lwjgl.LWJGLDisplaySystem

INFO: LWJGL Display System created.

(the first 2 lines means “Image loaded: <path…>”)

what could it be? :frowning:

can you paste the html code you are using with the appletloader?


how can i paste it, so it doenst be recognized by the browser?

Use blockquote tags, the code tags remove tags in the code atm…

ok, thanks, here it is

<head> Meu Applet </head>
<h1>MyApplet Page</h1>
<applet code="org.lwjgl.util.applet.AppletLoader"
width="640" height="480">

<param name="al_title" value="appletgame">
<param name="al_jars" value="lwjgl.jar,jme.jar,jme-awt.jar,AppletGame.jar">
<param name="al_main" value="br.unisc.AppletTestBoxColor">

<param name="al_logo" value="logo.png">
<param name="al_progressbar" value="barraprogresso.gif">

<param name="al_windows32" value="windows32_natives.jar">
<param name="al_windows64" value="windows64_natives.jar">

<param name="al_linux32" value="linux32_natives.jar">
<param name="al_linux64" value="linux64_natives.jar">

<param name="al_mac" value="macosx_natives.jar">

Ok, I replaced all < signs with & lt;

ops, it didnt work

i used




hmm, the html above looks pretty much correct, still pretty odd that nothing is thrown in the console.

Could you put a few System.out.println()'s in your code?, so as to narrow down how far the applet gets before it freezes/stops. Might be a case of exceptions getting caught and not thrown again.

Alternatively you could upload it somewhere, to allow a closer look at it.

hmmm… looks like my applet is not being called…

in the beggining of the simpleAppletSetup() method, i put this code:




rotQuat = new Quaternion();


but it’s NOT being printed…

ok, in that case its likely freezing/stopping somewhere in JME code.

Which version of JME are you using? will have to have a look at the source code for SimpleJMEApplet.

Could your paste the code to your main applet class too?


Oh, just had a look at the code for SimpleJMEApplet and it seems like SimpleJMEApplet uses the old AWTGLCanvas.

The better class to use seems to be SimpleApplet which uses the new LWJGL Display.setParent method.

Try SimpleApplet to see if it works better for you.

hmmm… interesting… i will try this SimpleApplet tomorrow morning. Thanks a lot :smiley:

Hi guys, I’m back. I decided to go for BaseSimpleApplet instead of SimpleApplet (both uses Display.setParent method)… but there is a weird thing happening… when I run the applet, it calls the simpleInitGame method, but doesn’t calls the simpleUpdate :confused:


public class AppletTestBoxColor extends BaseSimpleApplet {

Canvas display_parent;

private TriMesh t;

private Quaternion rotQuat;

private float angle = 0;

private Vector3f axis;


protected void simpleInitGame() {

try {


} catch (LWJGLException ex) {




rotQuat = new Quaternion();

axis = new Vector3f(1, 1, 0.5f).normalizeLocal();

Vector3f max = new Vector3f(5, 5, 5);

Vector3f min = new Vector3f(-5, -5, -5);

t = new Box(“Box”, min, max);

t.setModelBound(new BoundingBox());


t.setLocalTranslation(new Vector3f(0, 0, -15));



TextureState ts = display.getRenderer().createTextureState();




“Monkey.png”), Texture.MinificationFilter.Trilinear,





protected void simpleUpdate() {

if (tpf < 1) {

angle = angle + (tpf * 25);

if (angle > 360) {

angle -= 360;



rotQuat.fromAngleNormalAxis(angle * FastMath.DEG_TO_RAD, axis);


System.out.println(“THIS IS NOT BEING PRINTED”);