Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216401

Allow "file:" URLs in Class-Path of local JARs

    Details

    • Resolved In Build:
      b04
    • Verification:
      Verified

      Backports

        Description

        The JAR spec for the Class-Path[1] attribute states that entries must be relative URLs (though this wasn't enforced for much of Java's history).

        It has come to light that there is software in the wild that is misusing the Class-Path, by including absolute "file:" URLs.

        In the interest of compatibility, this long-standing behavior should be maintained. We should allow "file:" entries in Class-Path for JARs loaded from the local disk.

        Note that this change will not affect behavior by default, because the
        "jdk.net.URLClassPath.disableClassPathURLCheck" system property to disable Class-Path enforcement code is on by default.

        1. https://docs.oracle.com/en/java/javase/11/docs/specs/jar/jar.html#class-path-attribute

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bchristi Brent Christian
                  Reporter:
                  bchristi Brent Christian
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: