I’ve run into the problem that JOGL is great for my project, but I want to distribute it to my (non-technically-competent) users in a very friendly way. I can’t use Web Start.
The problem is getting the native libraries to be found by the VM. I’m well aware that you can set java.library.path from the command line (but this requires a custom launcher script for every user) or as an environment variable (but this requires configuring the user’s machine). I’d like to do it by “discovering” the location of my program’s jar file (which I can already do), and then doing a System.setProperty(“java.library.path”, …) command, but it’s apparently well known but poorly documented that changes to java.library.path within the program are ignored (see Java bug # 4280189).
Any workarounds for this? The folks at Sun are unlikely to make any changes, it seems, because although this is poorly designed it’s so rarely a problem. I could pre-load the library myself using System.load(), but the loadLibrary() call in net.java.games.jogl.impl.NativeLibLoader$1.run will still fail, so that doesn’t get me anywhere…
Thanks,
Ian