Problem with JDK modules (JDK 12)

Answered

I have a large maven project in which all the maven modules except for one have module-info.java. For that one I have provided an Automatic-Module-Name in MANIFEST.MF, call it 'x', The subproject (call it 'y') that uses x declares it in its module-info.java and compiles and runs successfully. However, IDEA marks the declaration and all classes belonging to x in red.

In y's module-info.java I see 'requires x;' marked 'Module not found'.

The classes are all marked 'Package 'x' is declared in the unnamed module but module 'y' does not read it'.

This appears to be a problem only in the IDE; as I said the build is OK. If I remove the declaration it fails. What is the problem?

 

0
1 comment

Hello,

As I see, the sample of such project has been provided and the issue has been identified in the following YouTrack item: 

https://youtrack.jetbrains.com/issue/IDEA-222692

And the bug which leads to this behavior is described here: 

https://youtrack.jetbrains.com/issue/IDEA-183692

Feel free to watch it in order to be notified once it has updates. 

0

Please sign in to leave a comment.