jdk/src/java.base/share/classes/java/net/JarURLConnection.java
changeset 36129 332b49163fc9
parent 25859 3317bb8137f4
--- a/jdk/src/java.base/share/classes/java/net/JarURLConnection.java	Mon Feb 15 16:59:56 2016 -0800
+++ b/jdk/src/java.base/share/classes/java/net/JarURLConnection.java	Mon Feb 15 17:47:53 2016 -0800
@@ -173,6 +173,14 @@
         }
 
         jarFileURL = new URL(spec.substring(0, separator++));
+        /*
+         * The url argument may have had a runtime fragment appended, so
+         * we need to add a runtime fragment to the jarFileURL to enable
+         * runtime versioning when the underlying jar file is opened.
+         */
+        if ("runtime".equals(url.getRef())) {
+            jarFileURL = new URL(jarFileURL, "#runtime");
+        }
         entryName = null;
 
         /* if ! is the last letter of the innerURL, entryName is null */