From 4aa1478b2e4f1401b08d093461b37a14c9501c29 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 1 Oct 2013 13:16:59 +0200 Subject: Bug 845: Add support for one big-fat jar file [java classes plus all native 'os.and.arch' libraries] JNILibLoaderBase.addNativeJarLibsImpl(..): If the modules's jar file contains the folder 'natives//' we assume a big-fat jar and attempt to load all native libraries from the same. The test for above folder is performed via the class ClassLoader's getResource(..) and is considered inexpensive. If the folder exists and native libraries could be loaded, the method returns successfull. Otherwise, the 'slim' jar file is attempted to be loaded, even if such folder exist. --- src/junit/com/jogamp/common/util/TestTempJarCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/junit/com/jogamp') diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java index 29fe4c5..7ddf52a 100644 --- a/src/junit/com/jogamp/common/util/TestTempJarCache.java +++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java @@ -147,7 +147,7 @@ public class TestTempJarCache extends JunitTracer { if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; } JarFile jarFile = JarUtil.getJarFile(GlueGenVersion.class.getName(), this.getClass().getClassLoader()); Assert.assertNotNull(jarFile); - JarUtil.extract(fileCache.getTempDir(), null, jarFile, false, true, true); + JarUtil.extract(fileCache.getTempDir(), null, jarFile, null, false, true, true); File f = new File(fileCache.getTempDir(), "META-INF/MANIFEST.MF"); Assert.assertTrue(f.exists()); f = new File(fileCache.getTempDir(), IOUtil.getClassFileName(GlueGenVersion.class.getName())); @@ -207,7 +207,7 @@ public class TestTempJarCache extends JunitTracer { URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName); - TempJarCache.addNativeLibs(TempJarCache.class, nativeJarURI); + TempJarCache.addNativeLibs(TempJarCache.class, nativeJarURI, null /* nativeLibraryPath */); String libFullPath = TempJarCache.findLibrary(libBaseName); Assert.assertNotNull(libFullPath); Assert.assertEquals(libBaseName, NativeLibrary.isValidNativeLibraryName(libFullPath, true)); -- cgit v1.2.3