diff options
-rw-r--r-- | src/java/com/jogamp/common/jvm/JNILibLoaderBase.java | 39 | ||||
-rw-r--r-- | src/junit/com/jogamp/common/util/TestTempJarCache.java | 15 |
2 files changed, 0 insertions, 54 deletions
diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java index 201fc59..033f1a5 100644 --- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java +++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java @@ -205,45 +205,6 @@ public class JNILibLoaderBase { } /** - * Loads and adds a JAR file's native library to the TempJarCache.<br> - * The native library JAR file's URI is derived as follows: - * <ul> - * <li> [1] <code>GLProfile.class</code> -> </li> - * <li> [2] <code>http://lala/</code> -> </li> - * <li> [4] <code>http://lala/'nativeJarBaseName'-'os.and.arch'.jar</code> </li> - * </ul> - * Where: - * <ul> - * <li> [1] is the <code>classFromJavaJar</code></li> - * <li> [2] is it's <i>URI path</i></li> - * <li> [4] is the derived native JAR filename</li> - * </ul> - * - * @param classFromJavaJar GLProfile - * @param nativeJarBasename jogl-all - * @return true if the native JAR file loaded successful or were loaded already, false in case of an error - */ - public static final boolean addNativeJarLibs(Class<?> classFromJavaJar, String nativeJarBasename) { - if(TempJarCache.isInitialized()) { - final StringBuilder msg = new StringBuilder(); - try { - final URI classJarURI = JarUtil.getJarURI(classFromJavaJar.getName(), classFromJavaJar.getClassLoader()); - final String jarName = JarUtil.getJarBasename(classJarURI); - return addNativeJarLibsImpl(classFromJavaJar, classJarURI, jarName, nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar", msg); - } catch (Exception e0) { - // IllegalArgumentException, IOException - System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while "+msg.toString()); - if(DEBUG) { - e0.printStackTrace(); - } - } - } else if(DEBUG) { - System.err.println("JNILibLoaderBase: addNativeJarLibs1: disabled due to uninitialized TempJarCache"); - } - return false; - } - - /** * Loads and adds a JAR file's native library to the TempJarCache, * calling {@link JNILibLoaderBase#addNativeJarLibs(Class[], String, String[])} * with default JOGL deployment configuration: diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java index a4518f0..cbc9735 100644 --- a/src/junit/com/jogamp/common/util/TestTempJarCache.java +++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java @@ -215,21 +215,6 @@ public class TestTempJarCache extends JunitTracer { } @Test - public void testTempJarCache03AddNativeJarLibs() throws IOException { - if(AndroidVersion.isAvailable) { System.err.println("n/a on Android"); return; } - final String libBaseName = "gluegen-rt"; - - JNILibLoaderBase.addNativeJarLibs(TempJarCache.class, libBaseName); - Assert.assertTrue(JNILibLoaderBase.isLoaded(libBaseName)); - - String libFullPath = TempJarCache.findLibrary(libBaseName); - Assert.assertNotNull(libFullPath); - Assert.assertEquals(libBaseName, NativeLibrary.isValidNativeLibraryName(libFullPath, true)); - File f = new File(libFullPath); - Assert.assertTrue(f.exists()); - } - - @Test public void testTempJarCache04aSameClassLoader() throws IOException { assertTempFileCachesIndividualInstances(true, TempJarCache.getTempFileCache(), TempJarCache.getTempFileCache()); |