For unknown reasons, some of my emails haven’t been reaching core-libs-dev. The below email didn’t either. Resending it now.
(I reported this delivery issue to the list admins earlier.) ---------- Forwarded message --------- From: Pavel Rappo <[email protected]> Date: Thu 23 Jul 2026 at 10:14 Subject: Re: [External] : Fwd: Consider clarifying jdeps man page To: Jaikiran Pai <[email protected]> Cc: <[email protected]> Hi, Jaikiran. On Wed, Jul 22, 2026 at 5:05 PM Jaikiran Pai <[email protected]> wrote: > > Hello Pavel, > > > 1. It seems that jdeps ignores the "Class-Path" in the manifest when > analysing a JAR file. If so, it could be useful to state it explicitly > to reduce the risk of incorrectly analysing a fat jar. > > A fat/uber JAR file is one that packages its dependencies (as JAR files) > within itself. The "Class-Path" attribute of such fat JAR cannot point > to those dependency JAR files that it packages within itself. Until > recently it wasn't clarified in the documentation. A recent update to > https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html > clarifies this part. Specifically: > > > Note: The Class-Path manifest attribute value doesn't refer to JAR > files or directories within the application JAR file. To load classes > and resources from JAR files within a JAR file, you must write custom > code. For example, if MyJar.jar contains another JAR file called > MyNested.jar, you cannot use the Class-Path attribute in MyJar.jar's > manifest to load classes in MyNested.jar. Thanks for pointing this out! I either didn't know that or had forgotten. From what I can see, the gist of the note has been the same since at least 2011! As you mentioned, it changed slightly between 2024 and 2026. That said, I wonder if it still makes sense for the jdeps man page to briefly note that the Class-Path JAR attribute is ignored regardless of where it points. > <snip> > > 4. Also consider this patch to tag along with any possible > clarifications: > > That patch seems to address some genuine issues in the man page text. I > think it would be worth to file a JBS issue just for that. I'll file a bug and maybe raise a PR if I have time. Thanks. -Pavel
