--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java Mon Mar 07 10:11:59 2016 -0500
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java Mon Mar 07 19:37:10 2016 +0000
@@ -758,9 +758,13 @@
final URL url;
try {
- // add #runtime fragment to tell JarURLConnection to use
- // runtime versioning if the underlying jar file is multi-release
- url = new URL(getBaseURL(), ParseUtil.encodePath(name, false) + "#runtime");
+ if (jar.isMultiRelease()) {
+ // add #runtime fragment to tell JarURLConnection to use
+ // runtime versioning if the underlying jar file is multi-release
+ url = new URL(getBaseURL(), ParseUtil.encodePath(name, false) + "#runtime");
+ } else {
+ url = new URL(getBaseURL(), ParseUtil.encodePath(name, false));
+ }
if (check) {
URLClassPath.check(url);
}