This isn't specific to any one page or example, it was something I found more than a little confusing about all the material on modules.
Besides for the command line options and which ones apply to which commands, one area to get confused or lost about is the required or recommended or optional parts of the directory structures.
The books follow a pattern where at some root directory for the whole Kit and Kaboodle, there is a mods directory, as well as a root directory for each module.
Now, the following two parts to be quoted make very clear that the name of one of them is chosen arbitrarily, but so as to avoid confusion, and also does not make clear that the naming of the other one follows the same pattern:
Jeanne and Scott wrote:In particular, feeding is the module directory, and the module-info file is directly under it.
Just as with a regular JAR file, we also have the zoo.animal.feeding package with one sub-folder per portion of the name.
The Task class is in the appropriate sub-folder for its package.
Also, note that we created a directory called mods at the same level as the module.
We will use it for storing the module artifacts a little later in the chapter.
This directory can be named anything, but mods is a common name.
If you are following along with the online code example, note that the mods directory is not included, because it is empty.
If someone isn't clear after this that mods is arbitrary in the sense that none of the Java tools enforce the name, but that we called it mods by convention so the humans won't get confused, they either rushed thru or are having issues with reading comprehension. It couldn't possibly be clearer.
However, the notion that similarly, the root directory of each module could have been called by the module name, which I have since seen elsewhere, or module1, module2, module3 etc., or in fact, if we wanted to be confusing, john, paul, george and ringo, was less clear to me. I eventually figured it out, but had my Unsure Flag set during a lot of the reading of the chapter.
The names arbitrarily chosen for the base directory of each module appear in all of the javac and jar creation commands, but in none of the commands for working with the .JAR artifacts themselves, as the name of the module's root directory is not exposed anywhere in the .JAR once it is created.
It seems very minor as I type this, but with my brain on heightened alert for file and directory name requirements, conventions and arbitrary choices I was indeed confused about the category of the name of the root directory for each modules source contents thru the whole read of the chapter. A few extra words about this right up front, similar to the advisory about the name mods, would have prevented such confusion on my part. I did see at least one other post about this point, but it is not clear how seriously the average reader takes the right/privilege/responsibility of feedback on minor points of confusion.
RTFJD (the JavaDocs are your friends!) If you haven't read them in a long time, then RRTFJD (they might have changed!)
Those are the largest trousers in the world! Especially when next to this ad: