From 1a8d2c627dbab5234aea72a458c00b6bba28add0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 1 Oct 2013 10:30:08 +0200 Subject: Fix Bug 844: Cannot ctor URI w/ scheme alone, use string-based concatenation native URI root and jar file. --- src/java/com/jogamp/common/util/JarUtil.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/java/com/jogamp/common/util/JarUtil.java') diff --git a/src/java/com/jogamp/common/util/JarUtil.java b/src/java/com/jogamp/common/util/JarUtil.java index 145368f..41d68d4 100644 --- a/src/java/com/jogamp/common/util/JarUtil.java +++ b/src/java/com/jogamp/common/util/JarUtil.java @@ -392,6 +392,19 @@ public class JarUtil { return new URI(IOUtil.JAR_SCHEME, jarSubUri.toString()+"!/", null); } + /** + * @param jarSubUriS file:/some/path/gluegen-rt.jar + * @return jar:file:/some/path/gluegen-rt.jar!/ + * @throws IllegalArgumentException null arguments + * @throws URISyntaxException + */ + public static URI getJarFileURI(String jarSubUriS) throws IllegalArgumentException, URISyntaxException { + if(null == jarSubUriS) { + throw new IllegalArgumentException("jarSubURIS is null"); + } + return new URI(IOUtil.JAR_SCHEME, jarSubUriS+"!/", null); + } + /** * @param jarFileURI jar:file:/some/path/gluegen-rt.jar!/ * @param jarEntry com/jogamp/common/GlueGenVersion.class -- cgit v1.2.3