Curious path problem: no jogl_cg in java.library.path.

I’ve got an applet running using the JoglAppletLauncher, and I’m trying to get jogl_cg going with it.

The joglAppletLauncher nicely puts jogl.dll, jogl_cg.dll, and jogl_awt.dll into a directory off my home directory (Under windows):
c:\documents and settings\user.jogl_ext\localhost\1.0.0-beta3\

Now, when I start the cg portion of the applet with:
CGcontext context = CgGL.cgCreateContext();

I get an error:
Exception in thread “Thread-7” javax.media.opengl.GLException: java.lang.UnsatisfiedLinkError: no jogl_cg in java.library.path

If I put the jogl_cg.dll somewhere like c:\windows, everything works.

So I figure, if I just add the directory the dll’s are in (c:\documents and settings\user.jogl_ext\localhost\1.0.0-beta3) to java.library.path that it would be able to find them.

But it doesn’t…

If I use a simpler path, and put jogl_cg.dll in c:\temp, and have c:\temp in my java.library.path, it doesn’t find it there either. FYI, to set my java.library.path, I’m using:
System.setProperty(“java.library.path”, “c:\temp;” + System.getProperty(“java.library.path”));

I’d rather not have to stoop to copying the .dll into the c:\windows directory, so does anyone know what’s going on?

Wild Bill Kelso

We don’t install the jogl_cg library in the JOGLAppletLauncher because Cg is not supported on all of JOGL’s supported platforms and because the Cg binding requires additional native libraries to be installed which we don’t ship. If you want to publish an applet using Cg you’ll have to modify the JOGLAppletLauncher and re-sign all of the associated jars yourself.

I would strongly recommend you consider using Java Web Start especially for experimental development. Some issues have been uncovered during the experimentation with the JOGLAppletLauncher which have been raised on these forums (which are beyond the control of JOGL) which currently make it a less than robust deployment platform.