On 27/08/2026 11:00, Rafael Winterhalter wrote:
Thanks! And yes, ModuleFinder. of(Path. . . ) specifies the run-time
derivation, and the runtime follows it exactly. My question is about
the compile-time half: javac derives the same *name* from the file
name but never the version, so a module compiled
If I now inspect the compiled module-info.class, the 2.33 version is
missing:
javap -v out/module-info.class | sed -n '/^Module:/,/exports/p'
Running the app using java does however surface the module:
java --module-path .:out -m demo.app/demo.Main
<https://urldefense.com/v3/__http://demo.app/demo.Main__;!!ACWV5N9M2RV99hQ!Lh_EaAccE2uvevch1NnmEkdu7--RcFsNzu0G-NmQNthTOUgp4mcaziiWd0mLa1e67Yt06uZVo_5CeAGBGIVF$>
Where 2.33 is visible in the stack trace. I would have expected that
javac considers the version of the automatic module the same way as
java does, but I am wondering if this is intended or an oversight.
Okay, so the question is about the requires table in the Module
attribute. Each entry specifies a dependency and it can optionally
record (for information purposes) the version of the dependence. I can't
find any notes to explain why it is recorded for explicit modules and
not for automatic modules, maybe Alex or others can find something.
-Alan