diff options
author | Sven Gothel <[email protected]> | 2013-10-01 07:41:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-01 07:41:45 +0200 |
commit | 506ae5e9fd258db7bfe737999e769477a32643a7 (patch) | |
tree | 02db71cca97d8d75fd7e0086586c4c2a0989add4 /src/java/com/jogamp/common/os | |
parent | 03d17baf99d3bcb0c0650f80e24d7813544d21fa (diff) |
Fix Bug 843: Remove Platform's requirement and use of TempJarCache.bootstrapNativeLib(), allowing versatile use of 1st native jar file (big-java-jar w/ big-native-jar)
The remaining Platform dependency existed in IOUtil.copyStream2Stream(..), used by JarUtil.extract(..),
i.e. the MachineDescription's PAGE_SIZE.
Solved by using a const buffer size of 4096 bytes.
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r-- | src/java/com/jogamp/common/os/Platform.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java index 32fc9f4..a01a4b4 100644 --- a/src/java/com/jogamp/common/os/Platform.java +++ b/src/java/com/jogamp/common/os/Platform.java @@ -33,7 +33,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.concurrent.TimeUnit; -import com.jogamp.common.util.IOUtil; +import com.jogamp.common.jvm.JNILibLoaderBase; import com.jogamp.common.util.JarUtil; import com.jogamp.common.util.ReflectionUtil; import com.jogamp.common.util.VersionNumber; @@ -192,19 +192,11 @@ public class Platform extends PlatformPropsImpl { // load GluegenRT native library if(_USE_TEMP_JAR_CACHE[0] && TempJarCache.initSingleton()) { - String nativeJarName = null; - URI jarUriRoot = null; - URI nativeJarURI = null; try { - final String jarName = JarUtil.getJarBasename( platformClassJarURI ); - final String nativeJarBasename = jarName.substring(0, jarName.indexOf(".jar")); // ".jar" already validated w/ JarUtil.getJarBasename(..) - nativeJarName = nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar"; - jarUriRoot = IOUtil.getDirname( JarUtil.getJarSubURI( platformClassJarURI ) ); - nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName); - TempJarCache.bootstrapNativeLib(Platform.class, libBaseName, nativeJarURI); + JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { Platform.class }, null, null ); } catch (Exception e0) { // IllegalArgumentException, IOException - System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while TempJarCache.bootstrapNativeLib() of "+nativeJarURI+" ("+jarUriRoot+" + "+nativeJarName+")"); + System.err.println("Catched "+e0.getClass().getSimpleName()+": "+e0.getMessage()+", while JNILibLoaderBase.addNativeJarLibs(..)"); } } DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false, cl); |