summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-01 10:30:08 +0200
committerSven Gothel <[email protected]>2013-10-01 10:30:08 +0200
commit1a8d2c627dbab5234aea72a458c00b6bba28add0 (patch)
tree90390174812b2d743725e7339ee449bc09642f77 /src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
parent506ae5e9fd258db7bfe737999e769477a32643a7 (diff)
Fix Bug 844: Cannot ctor URI w/ scheme alone, use string-based concatenation native URI root and jar file.
Diffstat (limited to 'src/java/com/jogamp/common/jvm/JNILibLoaderBase.java')
-rw-r--r--src/java/com/jogamp/common/jvm/JNILibLoaderBase.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
index caa8702..022ec0e 100644
--- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
+++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
@@ -156,9 +156,13 @@ public class JNILibLoaderBase {
if(TempJarCache.isInitialized()) {
final String nativeJarName = nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar";
msg.append(nativeJarName);
- final URI jarUriRoot = IOUtil.getDirname( JarUtil.getJarSubURI( classJarURI ) );
- msg.append(" + ").append(jarUriRoot);
- final URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName);
+ final URI jarSubURI = JarUtil.getJarSubURI( classJarURI );
+ if(null == jarSubURI) {
+ throw new IllegalArgumentException("JarSubURI is null of: "+classJarURI);
+ }
+ final String jarUriRoot_s = IOUtil.getURIDirname( jarSubURI.toString() );
+ msg.append(" + ").append(jarUriRoot_s);
+ final URI nativeJarURI = JarUtil.getJarFileURI(jarUriRoot_s+nativeJarName);
msg.append(" -> ").append(nativeJarURI);
if(DEBUG) {
System.err.println(msg.toString());