problem with applet+jogl

Hey there,

I am having trouble deploying my JOGL applet on the web. Has anyone been able to do it?
I followed the instructions of JOGLAppletLauncher doc but when mine runs it gets to the point where it says loading… and just sits there.
here is what i have done:
1.compiled my applet in the IDE and it ran well
2.made my whole project which my applet lyes in into a jar file
3.signed jogl.jar gluegen-rt.jar gluegen-rt-natives-windows-i586.jar jogl-natives-windows-i586.jar, and didn’t sign my applet jar as the https://jogl-demos.dev.java.net/applettest.html says
4.put all of the jars and native libraries into \lib
5.wrote up a html as followes

start the html page,and it started to ask if i agree to go on because of the sign stuff, and I clicked ok, then it got to the point where it said loading… and just sat there, and the java console couldn’t be check out.

Does anyone know what I may have done wrong. If not is there anywhere that has a clear tutorial on how to do this.

plus , when it stops at the “loading”,the directory .jogl_ext isn’t be created.

Does the JOGL applet test linked from the jogl-demos page work for you?

Are you running with JDK 6? If not, can you install it and, once the applet hangs, run the provided jstack.exe against the process ID of the web browser? That should provide a thread dump of what’s going on. Please post it.

HI,Ken! thank you very much for your immediate reply :slight_smile:

The jogl-demo works well on my browser, the gears are running great :)
i am now downloading JDK6, and gonna try your suggestion using jstack.exe.The result will be posted as soon as possible

sorry,i’ve made one tiny mistake.
the applettest linked page doesn’t work on my browser(IE6) which only shows a gray box.But i downloaded the jogl-demo.jar from the https://jogl.dev.java.net ,and wrote up a html in which the gear-applet ran well:

here is the message that showed after i used the jstack.exe
C:\Documents and Settings\Protranvil>jstack -l 3776
2007-03-28 11:32:19
Full thread dump Java HotSpot™ Client VM (1.6.0-b105 mixed mode):

“AWT-EventQueue-2” prio=4 tid=0x073dc400 nid=0xa0c in Object.wait() [0x07ebf000
.0x07ebfd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x10861d58> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x10861d58> (a java.awt.EventQueue)
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)

Locked ownable synchronizers:
- None

“AWT-EventQueue-1” prio=6 tid=0x06850c00 nid=0xd44 in Object.wait() [0x07dbf000
.0x07dbfd94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1082b0c0> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x1082b0c0> (a java.awt.EventQueue)
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)

Locked ownable synchronizers:
- None

“thread applet-com.sun.opengl.util.JOGLAppletLauncher” prio=4 tid=0x072b9800 ni
=0xdc0 in Object.wait() [0x078af000…0x078afb14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1081daa8> (a sun.plugin.AppletViewer)
at java.lang.Object.wait(Object.java:485)
at sun.applet.AppletPanel.getNextEvent(Unknown Source)
- locked <0x1081daa8> (a sun.plugin.AppletViewer)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

“AWT-EventQueue-0” prio=6 tid=0x067d8c00 nid=0x200 in Object.wait() [0x06f3f000
.0x06f3fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107b8a70> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(Unknown Source)
- locked <0x107b8a70> (a java.awt.EventQueue)
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)

Locked ownable synchronizers:
- None

“CacheCleanUpThread” daemon prio=6 tid=0x067a6c00 nid=0xa18 in Object.wait() [0
06e3f000…0x06e3fb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1081ddd8> (a com.sun.deploy.cache.CleanupThread)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.cache.CleanupThread.run(Unknown Source)
- locked <0x1081ddd8> (a com.sun.deploy.cache.CleanupThread)

Locked ownable synchronizers:
- None

“traceMsgQueueThread” daemon prio=6 tid=0x06790c00 nid=0xea8 in Object.wait() [
x06d3f000…0x06d3fc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107d92d8> (a java.util.ArrayList)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
- locked <0x107d92d8> (a java.util.ArrayList)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

“AWT-Windows” daemon prio=6 tid=0x0677e800 nid=0x818 runnable [0x06c3f000…0x06
3fc94]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

“AWT-Shutdown” prio=6 tid=0x0677dc00 nid=0x644 in Object.wait() [0x06b3f000…0x
6b3fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107d6828> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x107d6828> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

“Java2D Disposer” daemon prio=10 tid=0x06781000 nid=0x604 in Object.wait() [0x0
a3f000…0x06a3fd94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107d68c0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x107d68c0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at sun.java2d.Disposer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

“Low Memory Detector” daemon prio=6 tid=0x05ec5000 nid=0x338 runnable [0x000000
0…0x00000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

“CompilerThread0” daemon prio=10 tid=0x05ec0400 nid=0xe3c waiting on condition
0x00000000…0x0652f898]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

“Attach Listener” daemon prio=10 tid=0x05ebb400 nid=0x81c waiting on condition
0x00000000…0x00000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

“Signal Dispatcher” daemon prio=10 tid=0x05ebf800 nid=0x898 runnable [0x0000000
…0x00000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

“Finalizer” daemon prio=8 tid=0x05eaa400 nid=0x448 in Object.wait() [0x0622f000
.0x0622fc94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107d6b18> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x107d6b18> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

“Reference Handler” daemon prio=10 tid=0x05ea6000 nid=0x8f0 in Object.wait() [0
0612f000…0x0612fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x107d66c8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x107d66c8> (a java.lang.ref.Reference$Lock)

Locked ownable synchronizers:
- None

“main” prio=6 tid=0x0118a000 nid=0xb34 runnable [0x00000000…0x0012e820]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

“VM Thread” prio=10 tid=0x05ea2c00 nid=0xf4 runnable

“VM Periodic Task Thread” prio=10 tid=0x05ec6400 nid=0x7f4 waiting on condition

JNI global references: 1064

There’s no deadlock occurring. If the jogl-demos applet test isn’t working then I suspect you may have dropped the JOGL jar and/or .dll into your jre/lib/ext, which is not supported. If this is the case, please see the JOGL User’s Guide for instructions on how to properly install JOGL for local development.

If this isn’t the issue, I’d suggest you go into the Java Control Panel and enable the Java Console and logging. The log goes into c:/Documents and Settings/(UserName)/Application Data/Sun/Java/Deployment/log/ . Run your applet, close down the browser and see what the resulting log file says.

hi,ken,I didn’t put the jars and .dlls into the jre/lib/ext.
I checked out the java console,and the message is below:
I don’t get it because the names and directory are all right

Exception in thread “Thread-7” java.lang.NoClassDefFoundError: myWork/terrainApplet/AppletEntry (wrong name: terrainApplet/AppletEntry)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.opengl.util.JOGLAppletLauncher.refreshJOGL(JOGLAppletLauncher.java:608)
at com.sun.opengl.util.JOGLAppletLauncher.access$100(JOGLAppletLauncher.java:166)
at com.sun.opengl.util.JOGLAppletLauncher$4.run(JOGLAppletLauncher.java:411)

There’s a mismatch between the package name in your class and where you’ve put it in the jar file. If the package name is terrainApplet and the applet name is AppletEntry, then it needs to be packaged in exactly the directory structure terrainApplet/AppletEntry.class.

Ken, I eventually found out that I 'd make mistake when i was packaging the jar file which lead to the missfound mistake!
Now, the applet runs well!
thank you so much for helping me out!
bart from China