Posted by
Sven Gothel on
Aug 14, 2013; 4:03pm
URL: https://forum.jogamp.org/JOGL-TempJarCache-natives-jars-already-in-classpath-tp4029804p4029813.html
On 08/14/2013 04:10 PM, sam [via jogamp] wrote:
> gouessej wrote
> I'm happy to see that it works for you now. Maybe Sven has a better
> suggestion, it would be better if you used the build-in mechanism of
> GlueGen that already works in applets and Java Web Start.
>
> another interesting idea,
>
> I looked up the code and there is already some special hook to specify a
> custom library loader. The advantage is using this custom library loader I can
> extract the files to a temporary directory instead of the primary one + I
> don't need to now the exact file names.
.. and last but definetly not least: 'com.jogamp.common.util.JarUtil.Resolver',
which currently allows one to resolve a non std protocol.
We may be able to add a similar 'plugin' to resolve the
native library name, i.e. in case you have a different naming scheme.
Still, I would only 'allow' this to change the native jar basename,
i.e. keeping the URI location intact (protocol, server and path).
IMHO this should solve the problem for any jar/native-jar name-space
combinations, while still using the jar/native-jar concept.
?
>
> code
>
> 1. before starting JOGL set that it should use a custom library loader:
>
> System.setProperty("jnlp.launcher.class", SandBoxLibraryLoader.class.getCanonicalName());
Note: We may remove 'jnlp.launcher.class' due to security considerations ..
undecided yet.
~Sven