JOGL Applet

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL Applet

neri alamanni
Hi All
probably this topic is already covered. But I did find a conclusive  solution and I am losing a lot of time.
I wrote an applet using NetBeans 6.8. Using NetBeans' applet launcher, everything is fine but when I try to run a html page with the applet I have a lot of errors
The html code to run the applet is:

<HTML>
<HEAD>
   <TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>

<HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%">


<P>
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
      width=600
      height=400
      archive="http://jogamp.org/deployment/util/applet-launcher.jar,
               http://jogamp.org/deployment/webstart/nativewindow.all.jar,
               http://jogamp.org/deployment/webstart/jogl.all.jar,
               http://jogamp.org/deployment/webstart/gluegen-rt.jar,
               OrientaPannelli_Applet.jar">
   
   
   
   
   
   
   
</applet>

</P>

<HR WIDTH="100%">Generated by NetBeans IDE
</BODY>
</HTML>

Into java console I can see these errors:
JNLPAppletLauncher: static initializer
Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: javax/media/opengl/GLJPanel
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1969)
        at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:661)
        at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1324)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(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: javax.media.opengl.GLJPanel
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 19 more

but.. isn't the jnlp page "http://jogamp.org/deployment/webstart/jogl-core.jnlp" in charge of loading all the jogl dll stuff?
Any help is really appreciated..
Thank you
neri
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

Worker
It seems there is missing an library. 'GLJPanel' looks to some awt stuff.
For testing, also load newt.all.jar.
You must also have the *.dll's in the base path,
so the JNLPLauncherApplet can load your dll's to the client.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

neri alamanni
Thank you for your reply
Which is exactly the "base" path? Have I to add this path to the PATH environment variable?
In this path i guess there should be even the libraries for non Windows platform
thank you
neri alamanni
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

Worker
No, No.
The basepath is the root where the applet resides, it can be relative
or absolute.It has nothing to do with the 'PATH environment variable'
on your local machine.

 
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

neri alamanni
No solution yet, all dll stuff is located in the same folder of the applet but i still have exceptions in loading dll's at applet loading
Is there a step-by-step procedure to release an applet involving JOGL?
thank you
neri
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

Wade Walker
Administrator
Hi Neri,

I'm not aware of a step-by-step tutorial for applets yet, but I do have some simple instructions in the thread at http://forum.jogamp.org/Mac-OS-Java-Update-1-6-0-20-breaks-JOGL-applets-tp827857p827857.html. If you look at my posts, I point to another thread where I give instructions, and I also posted a zip file containing a simple applet.

My simple test applet doesn't use a web server, though -- it just loads all the files from the local disk. So if your problems are web sever based, my examples may not help.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Applet

Worker
This post was updated on .
In reply to this post by neri alamanni
Strange, my applets works perfect with loading from jboss application server
and he uses the web container tomcat that loads all jars and .dll's or .so's for linux.

(The only problem in applets are cube textures, they are complete
destroyed there, compressed  and uncompressed textures.
Use instead a sky sphere that does works also in an applet.)

Normaly, when you test it local, its very simple at all.
What you need, is a bit understanding how a webcontainer or
webserver works.

You must only correct define your requirements, so that
the server can deliver your jars and dll's to the browser.
The main work does the JNLPLauncherApplet for you.

Look in your start page, most index.html, your referenced project
jnlp, what is called in your index.html and look that all
*.jars and *.dll's are in the root path.

Pack your classes and resources also in your own jar,
the only, YOURS, that is not signed.

Now you must have such a structure on a normal web server :
(for an application server how jboss, we must take other steps, eg. create a *.war)

myappletproject.jnlp
gluegen-rt.dll
gluegen-rt-jar
jogl.all.jar
myown.jar (with your applet in it)
nativewindow.all.jar
nativewindow_all.dll
nativewindow_win32.dll
index.html (calls the applet and holds a reference to myappletproject.jnlp)

 

I hope that helps.....