Monday, June 13, 2011

Update 06/13/2011

The wigwam applet is now compiling AND EXECUTING properly on my local workstation.  See picture below:


The key configuration elements in order to arrive at successful execution are as follows:

1.  Add a library to the project called JOGL referencing the jogl.jar file from libs.zip.
2.  Add a library to the project called GLUEGEN-RT referencing the gluegen-rt.jar from libs.zip.
3.  Ignore/delete the libary, JOgl in the project.
4.  Load the following files into a local folder on the workstation (all from libs.zip):  jogl.dll, jogl_cg.dll, jogl_awt.dll, gluegen-rt.dll, libjogl.jnilib, libgluegen-rt.jnilib, libjogl_cg.jnilib, libjogl_awt.jnilib.
5.  Add the directory in which the files of step 4 were placed to the Windows PATH environment variable.
6.  In the project properties window, under the WebStart node, set the AppletDescriptor/Applet Class to wigwam.WigwamApplet, (NOT wigwam.Wigwam).

"Gotchas" that cost a lot of time in figuring this out:

1.  There are other versions of jogl on the internet.  These don't necessarily work with the current version of the Wigwam applet.  One version that I made the mistake of trying to use during experimentation (based on a search for jogl_cg.dll) is at http://csis.pace.edu/~marchese/CG/JOGL/Jogl1l.htm.    Don't be lured into downloading the jogl deployment package at this site - it won't help you and will only serve to confuse the issue!!!!  This version has a DIFFERENT INTERFACE (but some commonality, just to further confuse things) from the version required by the Wigwam applet.  Also, it does not have the required gluegen_rt.jar, gluegen_rt.dll, and the jni libraries required for the graph of the Wigwam applet.

2.  Even when it is known that the two libraries, (the one in libs.zip and the one from the site given above), are different, one must be careful about the way in which the directories to which the libraries are installed are ordered in the PATH environment variable.  That is, even though the path to the correct set of libraries (from libs.zip) was included in the PATH variable, that directory was listed AFTER the directory for the one for the package downloaded from the marchese site, which meant that the OS would resolve function calls to the wrong libraries because their names/some elements of interface matched in the wrong files.  Once the directory to the marchese package was deleted, the function calls were resolved correctly by the OS.

3.  As alluded to in item 6 of the configuration element list given above, make sure the Applet class is wigwam.WigwamApplet, not wigwam.Wigwam.  This setting was created when I first created the project after downloading the code from svn for the first time, before I became acquainted with how the code was organized.  Even though both classes extend JApplet, only WigwamApplet actually has event code for establishing the complete interface (init(), start(), etc.)  This setting had to be rediscovered/changed to WigwamApplet.

4.  It seems that the code will compile without gluegen-rt.jar.  However, strangely, in order for the code to *execute* properly, gluegen-rt.jar must be referenced in the project.

WHEW!!!!!  that was painful, but it's behind us........

No comments:

Post a Comment