RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

Jaikiran Pai jpai at openjdk.org
Tue Aug 27 04:17:03 UTC 2024


On Mon, 26 Aug 2024 07:06:54 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> Separately, I've often wondered how many plugins are putting file paths into the value by mistake, this has historically been an area of confusion.

You are right - the values that get used in a `Class-Path` entry keeps coming up for discussion frequently. I remember there was one around 3-4 years back (but I can't find that mail thread now). I went back and checked the documentation to see if that can be improved. The current specification of this attribute at https://docs.oracle.com/en/java/javase/21/docs/specs/jar/jar.html#class-path-attribute is very extensive and I think very clear (and that's a good thing). However, I think that page isn't visited very often or found easily. The tutorial for creating manifest files and adding `Class-Path` entry, I think, is the more commonly visited one https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html (at least that's the one I usually find in search results). I wonder if that tutorial page can be improved a bit or at least point to the specification page of the `Class-Path` attribute.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20691#issuecomment-2311534675


More information about the core-libs-dev mailing list