Sign in to follow this  
e_pech

[java] JOGL Applet not displaying in Browser

Recommended Posts

Hey! I've made an Applet using Netbeans, in my computer it runs OK, even if I uploaded to the server with the following code:

<applet codebase="classes" code="org.jdesktop.applet.util.JNLPAppletLauncher" width=640 height=480 archive="http://download.java.net/media/applet-launcher/applet-launcher.jar, http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar, http://download.java.net/media/gluegen/webstart/gluegen-rt.jar, appletperron/AppletPerron.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.displayname" value="en OpenGL por Esaias Pech"> <param name="subapplet.classname" value="appletperron.Main"> <param name="noddraw.check" value="true"> <param name="progressbar" value="true"> <param name="jnlpNumExtensions" value="1"> <param name="jnlpExtension1" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"> </applet>

But on a computer where I don't have installed the JOGL.rar, JOGL.dll files, it does not run, the Java Console gives the following message: JNLPAppletLauncher: static initializer os.name = windows xp nativePrefix = nativeSuffix = .dll tmpRootDir = C:\DOCUME~1\Pech\LOCALS~1\Temp\jnlp-applet\jln508134623373710497 Applet.init subapplet.classname = appletperron.Main subapplet.displayname = en OpenGL por Esaias Pech Applet.start os.name = windows xp os.arch = x86 processNativeJar: using previously cached: C:\Documents and Settings\Pech\.jnlp-applet\cache\pech_host22_com\43f444f5655f523040dfe31211ceb8dfabc991d6\jogl-natives-windows-i586.jar validateCertificates: VALIDATE: jogl.dll VALIDATE: jogl_awt.dll VALIDATE: jogl_cg.dll extractNativeLibs: EXTRACT: jogl.dll(jogl) EXTRACT: jogl_awt.dll(jogl_awt) EXTRACT: jogl_cg.dll(jogl_cg) processNativeJar: using previously cached: C:\Documents and Settings\Pech\.jnlp-applet\cache\pech_host22_com\43f444f5655f523040dfe31211ceb8dfabc991d6\gluegen-rt-natives-windows-i586.jar validateCertificates: VALIDATE: gluegen-rt.dll extractNativeLibs: EXTRACT: gluegen-rt.dll(gluegen-rt) Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: net/java/games/jogl/GLEventListener at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1914) at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:658) at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1269) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: net.java.games.jogl.GLEventListener at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 13 more ON THE COMPUTER WHERE I DEVELOPED THE APPLET, IT RUNS FINE (EVEN FROM THE WEBSERVER) BUT I ASSUME IT"S BECAUSE I HAVE THE LIBRARIES INSTALLED, SO MY QUESTION IS, DOES THE COMPUTER NEED TO HAVE THE LIBRARIES INSTALLED??? I THOUGHT THAT'S THE PURPOSE OF THE JNLP Launcher, What could it be?? THe link to the Applet is: http://pech.host22.com/appletGL/ The applet is supposed to draw lines according to the user's input with the mouse.

Share this post


Link to post
Share on other sites
What version of JOGL are you using? I think that error is being caused by developing the program based on an old version of JOGL, but when you run the program on a computer that doesn't have the old version installed, the new version is being downloaded. In the new version GLEventLister is located at javax.media.opengl.GLEventListener, but your code is referencing net.java.games.jogl.GLEventListener. Try downloading the new version to use in development and changing your code to match its conventions.

Share this post


Link to post
Share on other sites
Quote:
Original post by greggles
What version of JOGL are you using? I think that error is being caused by developing the program based on an old version of JOGL, but when you run the program on a computer that doesn't have the old version installed, the new version is being downloaded. In the new version GLEventLister is located at javax.media.opengl.GLEventListener, but your code is referencing net.java.games.jogl.GLEventListener. Try downloading the new version to use in development and changing your code to match its conventions.


Thanks, I'll try that today and let you know how it went! Once again, thank you!

Share this post


Link to post
Share on other sites
Quote:
Original post by greggles
What version of JOGL are you using? I think that error is being caused by developing the program based on an old version of JOGL, but when you run the program on a computer that doesn't have the old version installed, the new version is being downloaded. In the new version GLEventLister is located at javax.media.opengl.GLEventListener, but your code is referencing net.java.games.jogl.GLEventListener. Try downloading the new version to use in development and changing your code to match its conventions.


Hey! Sorry for not posting before, the Appet is Up and Running! Thank you very much, that was the problem, I was usgin an old JAR to develop and from the HTML code I was calling a newest version of the JAR.
I had to download the new ones, adjust my code a little bit (GLDrawable to GLAutoDrawable for example) and everything worked out perfectly!
Thanks...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this