I can certainly test, within the Java applet, whether JOGL is present or not. The problem is that I want to ensure that it is present PRIOR to the applet starting.
The Java Plug-In from Sun is (on Windows) an ActiveX control which basically ensures that a specified JRE is present (and downloads/installs it if iti’s not) before launching your applet.
The Java Plug-In can be extended to install “extensions” – but these are in the form of jar files (with accompanying manifests) which the Plug-In installs in the jre/lib/ext directory. I need a way to get the JOGL native files (DLL’s on Windows) into the jre/bin directory prior to launching the applet.
There is another problem with the “test for the libraries inside the applet” solution – what do I do if the libraries aren’t present? Within the Java Applet Sandbox, there is no way that I could copy the native (DLL) files into the client’s JRE – and even if I could do THAT, I would need to shut down and restart the JVM.
So really the only option is to ensure that the JOGL files are installed properly (native DLL’s in jre/bin and jogl.jar in jre/lib/ext) before my applet starts.
Has anyone found a way to do this? I was thinking of writing an ActiveX control which first instantiates the Java Plug-In, and first directs the Java Plug-In to do its thing (installing the JRE if necessary). Then my ActiveX control would check for JOGL installation, and put the files where they belong if necessary.
I would need to learn how to interact with the Java Plug-In (in the same way that the browser interacts with it) but since the browser-to-plug-in interface is documented, I suppose that I could instatiate the Java Plug-In (within my own ActiveX control) and simulate the browser telling it to do its thing. These seems like a lot of work, and also seems error-prone to me.
So I’m still looking for a clean, tested solution, if one exists.