LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: yuma on November 14, 2012, 14:20:40

Title: [Solved] Applet stopped working
Post by: yuma on November 14, 2012, 14:20:40
Ahoy there! First post here!

I've been having a problem with applets. It happens with my games and with the gears example provided in the LWJGL source distribution file. I think I'm not good at describing it because I find no clue on Google about it. The thing is that when I create an applet and run it from Eclipse or from a browser it works nice until I try to close it. When I close it the game loop stops (good) but after 10-20 seconds I get a "Java has stopped working" Windows message, i.e.,

(https://dl.dropbox.com/u/9308503/AppletStoppedWorking.png)

Has anyone found him/herself in such situation? Do you know what am I doing wrong? I'm kind of loosing my mind here...

I'm using the latest LWJGL (but also happened in previous versions) and my java settings are:

$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)


Thanks! <3




EDIT: I placed a closed tag on the thread, but I think it's better to place a solved one.
Title: Re: Applet stopped working
Post by: yuma on November 14, 2012, 14:51:01
Don't ask me why because I don't know why I did this, but I changed the "Compiler compliance level" from 1.6 to 1.7 and now it works perfectly in Eclipse. When I quit it nicely exits. No complaints.

The same happens with the LWJGL Applet Loader (which I thought only ate java6 applets and that's why the compliance level was 1.6 in the first place).

Sorry for the noise! :-(

Title: Re: [Closed] Applet stopped working
Post by: CodeBunny on November 14, 2012, 19:07:27
When you closed the applet, maybe you had code that only worked in Java 7?
Title: Re: [Closed] Applet stopped working
Post by: yuma on November 14, 2012, 20:49:28
I'm not sure... I think all I have is harversted from this page and that one which usually are very old (2010 and before). So it should be compatible with jre6...
Title: Re: [Solved] Applet stopped working
Post by: CodeBunny on November 15, 2012, 14:11:06
What was the code that occurred when the applet closed?