What does the automatic module require and export? The answer is--everything! Remember that the platform creates the module descriptor automatically, so it has no idea what the module needs or what it will be used for. To make sure things work, it creates the least restrictive module definition possible.
- It requires transitive all resolved modules
- It exports all modules
- It reads the unnamed module (that is, all code in the classpath)
I hope you agree that this is the worst module definition you can possibly create for a module. However, this is required to ensure that the libraries in the Java ecosystem work seamlessly as automatic modules. This is not the ideal end state. We'd like to move to an environment where all the libraries are modularized too, and we work with actual modular JAR files with well-defined requires and exports definitions in the module path. Until that happens, automatic modules help get us going with the migration.