Unable to read unnamed module
had a very nasty question that I didn’t understand….
We have a whole library of utilities written in jdk8, which has nothing to do with puzzles, so we also do not set the automatic module name in the META-INF file.
Now we need to migrate the product to Java 11 using these utility libraries.
- I created a module-info.java and entered all the required modules, but there are some issues with util-libraries.
- Some utility libraries are loaded as unnamed modules, which can be added as required modules. But for some of the others in these utility libraries, it is not possible to add them because they do not get module names based on their jar files.
From my IDE I get the following error:
Package “x” is declared in an unnamed module, but module “y” does not read it.
Package X is in one of our utility libraries, and module Y is the product that should be migrated to Java 11.
Any ideas for me to understand the issue?
The solution to this particular problem is my IDE. IntelliJ does not support reading Unnamed Modules or Automatic Modules from Projects imported into the IDE. I’ve started bug reporting at jetbrains.