I want to understand the modularization system which came with Java 9, I have to use now Java 11, some time later switch to Java 17 or higher.
I found this simple example https://www.youtube.com/watch?v=ZogBPXNy3uU which shows it in IntelliJ, but it's from 2017 and the IntelliJ version is older then mine (2021.3.2).
I see some visual differences when creating that example in my IntelliJ... when opening the Projects sidebar I see also the project name (java-modules in my case I called the empty project), both modules from the example are listed below it, if this is a significant difference.
In Project Structure > Project Settings > Modules I see also the java-modules as a module besides the two seen in the example video.
The problem that I have now is, that I cannot run the main() method, the options Run 'Component.main()' and Debug 'Component.main()' are grayed out.
My questions:
How to fix this example to run it? \
CodePudding user response:
As described in my comment it functions after the IntelliJ update.
