@@ -1135,7 +1135,7 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li
11351135 *
11361136 * @param cls the Class whose package name and {@link ClassLoader} are used to extract from resources
11371137 * @param properties contains the directories to scan for if we fail to extract the library from resources
1138- * @param libnameversion ":" to disable prefixes and suffixes + the name of the library + "@" + optional version tag
1138+ * @param libnameversion the name of the library + ":" + optional exact path to library + "@" + optional version tag
11391139 * + "#" + a second optional name used at extraction (or empty to prevent it, unless it is a second "#")
11401140 * + "!" to load all symbols globally
11411141 * @param pathsFirst search the paths first before bundled resources
@@ -1146,6 +1146,9 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li
11461146 if (libnameversion .startsWith (":" )) {
11471147 nostyle = true ;
11481148 libnameversion = libnameversion .substring (1 );
1149+ } else if (libnameversion .contains (":" )) {
1150+ nostyle = true ;
1151+ libnameversion = libnameversion .substring (libnameversion .indexOf (":" ) + 1 );
11491152 }
11501153 if (libnameversion .endsWith ("!" )) {
11511154 libnameversion = libnameversion .substring (0 , libnameversion .length () - 1 );
@@ -1262,7 +1265,7 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li
12621265 * Finally, if all fails, falls back on {@link System#loadLibrary(String)}.
12631266 *
12641267 * @param urls the URLs to try loading the library from
1265- * @param libnameversion ":" to disable prefixes and suffixes + the name of the library + "@" + optional version tag
1268+ * @param libnameversion the name of the library + ":" + optional exact path to library + "@" + optional version tag
12661269 * + "#" + a second optional name used at extraction (or empty to prevent it, unless it is a second "#")
12671270 * + "!" to load all symbols globally
12681271 * @param preloaded libraries for which to create symbolic links in same cache directory
@@ -1276,6 +1279,8 @@ public static synchronized String loadLibrary(URL[] urls, String libnameversion,
12761279 }
12771280 if (libnameversion .startsWith (":" )) {
12781281 libnameversion = libnameversion .substring (1 );
1282+ } else if (libnameversion .contains (":" )) {
1283+ libnameversion = libnameversion .substring (0 , libnameversion .indexOf (":" ));
12791284 }
12801285 boolean loadGlobally = false ;
12811286 if (libnameversion .endsWith ("!" )) {
@@ -1429,6 +1434,8 @@ public static synchronized String loadLibrary(URL[] urls, String libnameversion,
14291434 public static String createLibraryLink (String filename , ClassProperties properties , String libnameversion , String ... paths ) {
14301435 if (libnameversion != null && libnameversion .startsWith (":" )) {
14311436 libnameversion = libnameversion .substring (1 );
1437+ } else if (libnameversion != null && libnameversion .contains (":" )) {
1438+ libnameversion = libnameversion .substring (0 , libnameversion .indexOf (":" ));
14321439 }
14331440 if (libnameversion != null && libnameversion .endsWith ("!" )) {
14341441 libnameversion = libnameversion .substring (0 , libnameversion .length () - 1 );
0 commit comments