This is a desperate plea. I have a VERY SIMPLE request:
Please pin a topic explaining the options and caveats for deploying JOGL apps. Failing that, please respond as to why this won't happen. It would be greatly appreciated by many people.
The more detailed issue follows. Note how I'm giving a pretty good outline of the proposed HOWTO, sans the definitive answers...
Having searched around high and low, I have seen many explanations as to how to deploy JOGL apps. The majority consensus seems to be to use Java Web Start. In some places I've seen it recommended that the JOGL libraries (both JAR files and platform-specific native pieces) be added to the JRE's standard extension directory; in other places I have seen dire warnings not to do this (with sketchy explanations given as to why not). The latter recommend either JWS or setting the system-wide CLASSPATH and platform-specific library path environment variables. I have also seen mention of a method to use JOGL in applets, but have not yet tried to do this myself.
Here are some problems with these suggestions:
1. In many situations, Java Web Start is not desirable. To name a few: you have a ginormous app you want to distribute on a CD or other media that uses JOGL; you want users to be able to run the app as a locally installed, offline application, since it has nothing to do with the internet; you are really lazy and don't want to investigate the poorly documented JWS setup and write a big XML file; you don't have access to a static web server host; you are using JOGL in an app containing other libraries that can not be deployed this way. I think I've made my point on this.
2. Setting the CLASSPATH and PATH does not appear to work. At least didn't work for me. (JOGL 1.1.0, JRE 1.5.0_9, Windows XP) I cannot for the life of me think why it wouldn't work, but it does not. I tried rebooting; nothing. I set both these variables to the location containing all the JOGL libraries (JARs and .DLLs). As I've seen documented. When I try to execute my simple JOGL app, either by double-clicking the JAR file or doing java -jar testapp.jar from the command line, I get an error. (In double-click case this error erroneously tells me that main class could not be found; by putting JOGL libraries into the JRE's extension directory, the app runs just fine, indicating that in fact the main class is easy to find, and is specified correctly in the jar manifest, but this would seem to be a JRE issue.)
3. I can run by test app by giving a full java -classpath ".;%CLASSPATH%;C:\jogl\jogl.jar;C:\jogl\gluegen.jar" -jar testapp.jar . However this is a pain in the ass, and the whole point here is I am trying to allow end users to run this app. For that matter, even setting the system-wide CLASSPATH and PATH variables (or LD_LIBRARY_PATH on Linux, whatever it is on OS X) is not something users are going to do for the most part. (For development its also simple to let my IDE add the JARs to the build path and test within the IDE.)
3. Because of 1,2, and 3, I appear to be left with no options but to copy the JOGL libraries into my JRE's lib/ext directory. Though this is discouraged with dire warnings, it works just fine for me so far. As for these dire warnings, I do understand that this method will break whenever the JRE is updated to another version (again, a JRE issue; IMHO it ought to be smart enough to keep already installed extensions when updating, or allow users to choose this option). I have also been warned that this causes a conflict when other apps using Java Web Start but using a different (or even same?) version of JOGL are loaded. So that's no good...
4. When I've tried to have a couple friends test my app, they have had failures I cannot explain. One, also using Windows XP, was unable to get the app to run correctly when double-clicking even after placing the JOGL libraries in the JRE's extension directory. She was able to run from the command-line though, doing java -jar testapp.jar, with the libraries in the extension dir. This mystifies me, as I am able to double-click the jar file. Another friend on OS X who out of paranoia has so far refused to place the libraries into the extension dir has had errors even when invoking from the command-line with the full classpath to the libraries specified, that he solved only by moving to the same directory as my app before invoking. The point is, it has been a pain in the ass to tell other users how to run the app.
5. So based on these points, it appears there is *no* reliable way to run JOGL apps, other than Java Web Start (see point #1). Correct me if I'm wrong, but isn't deploying an app likely to be something *all* developers will want to do at some point? It seems there ought to be a simple way to allow users to have the same experience with a Java app (3D or otherwise) as with any other application. I am not averse to using an installer package like InstallAnywhere, or even writing my own batch and shell files for different target platforms so users can double-click something, but as this post details, I'm not sure where the JOGL stuff ought to be installed or what those scripts ought to contain.
I hope the detail here is helpful and not aggravating and that it is appreciated that the need for solid answers to these issues in a highly visible place is important to all potential JOGL users and developers. If such a resource exists, by all means point me to it and I will apologize for being redundant (but please pin it on these forums).