LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: shultays on January 13, 2010, 15:12:04

Title: problem while testing lwjgl opengl applets
Post by: shultays on January 13, 2010, 15:12:04
It says "Fatal Error Occured (7)" while I test my application

I am using eclipse and my application runs fine while I test it on eclipse. But I can't run it on a web page

Gears example runs fine but when I test my application it gives that error.

I am new to java applets and lwjgl. I used opengl and directx with c++ but never tried it on java.

I guess this should also work but it gives same error. I found the source code of Gears example and compiled it using eclipse than I tried

<param name="al_main" value="Gears">

but this didn't work either. I am sorry if this is stupid thing to do, as I said I never used applets before :)
Title: Re: problem while testing lwjgl opengl applets
Post by: kappa on January 13, 2010, 15:20:21
"Fatal Error Occured (7)" means you applet is crashing on initialisation, while it switches from appletloader to your applet.

can you post your output of the java console?

also the gears applet example included with lwjgl is the file here http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java?view=log

So class is called "GearsApplet", while you use "Gears" unless your using a different class or have renamed it.
Title: Re: problem while testing lwjgl opengl applets
Post by: shultays on January 13, 2010, 15:29:56
Sorry, I forgot to add. I renamed it to Gears

Here is my console output

Fatal error occured (7): Gears
java.lang.ClassNotFoundException: Gears
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:754)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:643)
   at java.lang.Thread.run(Unknown Source)



I tried "Gears", "./Gears" and finally direct path to Gears but they all failed.

can't I use .class files? or it must be a jar file?

Title: Re: problem while testing lwjgl opengl applets
Post by: kappa on January 13, 2010, 15:33:09
hmm, just looks like its not finding the Gears class, can you upload the applet somewhere so I can have a look at it?
Title: Re: problem while testing lwjgl opengl applets
Post by: shultays on January 13, 2010, 15:41:39
sure

http://www.shultays.com/applet/appletloader.html

and you can see all files here

http://www.shultays.com/applet/

Title: Re: problem while testing lwjgl opengl applets
Post by: kappa on January 13, 2010, 15:48:09
ahh, you have to put your class files in a jar file (just a zip file renamed)
and then point to it in the al_jars parameter.

p.s. you don't need the lwjgl_applet.jar.pack.lzma file in your al_jars parameter if you using your own jar (since that contains the standard GearsApplet files)
Title: Re: problem while testing lwjgl opengl applets
Post by: shultays on January 13, 2010, 15:57:38
Thank you very much! It works now