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

Correct URLClassLoader API documentation to explicitly say jar-scheme URL's are accepted

    XMLWordPrintable

Details

    • b128
    • Not verified

    Description

      It appears to be an undocumented “feature" that URLClassLoader can accept base jar-scheme URLs such as:

       jar:file/….!/
       jar:http/….!/

      by virtue of those URLs being passed to URLClassPath, which is contrary to what is stated on URLClassLoader:

      "Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be opened as needed.”

      The above only reliably applies to file-scheme URLs.

      Attachments

        Activity

          People

            sdrach Steve Drach (Inactive)
            sdrach Steve Drach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: