I have 2 different projects in the same folder: com.jdojo.address
and com.jdojo.person
. The first has a simple pojo class Address
and a module-info.java
under default package:
module com.jdojo.address {
exports com.jdojo.address;
}
No errors here.
In the com.jdojo.person
project I have a Person
class that uses an Address
attribute from the previous one. The module-info.java
:
module com.jdojo.person {
requires com.jdojo.address;
exports com.jdojo.person;
}
I have an error in the requires
line:
module not found: com.jdojo.address
I have this issue both with NetBeans IDE Dev (Build 201708030001) and IntelliJ IDEA 2017.2.1.
├───com.jdojo.address
│ ├───.idea
│ │ └───inspectionProfiles
│ ├───nbproject
│ │ └───private
│ └───src
│ └───com
│ └───jdojo
│ └───address
├───com.jdojo.intro
│ ├───.idea
│ │ ├───inspectionProfiles
│ │ └───libraries
│ ├───build
│ │ ├───classes
│ │ │ └───com
│ │ │ └───jdojo
│ │ │ ├───address
│ │ │ ├───intro
│ │ │ └───person
│ │ ├───empty
│ │ └───generated-sources
│ │ └───ap-source-output
│ ├───dist
│ ├───nbproject
│ │ └───private
│ ├───src
│ │ └───com
│ │ └───jdojo
│ │ └───intro
│ └───test
├───com.jdojo.person
│ ├───.idea
│ │ └───inspectionProfiles
│ ├───nbproject
│ │ └───private
│ ├───src
│ │ └───com
│ │ └───jdojo
│ │ └───person
│ └───test
├───lib
├───mods
│ └───com.jdojo.intro
│ └───com
│ └───jdojo
│ └───intro
└───src
└───com.jdojo.intro
└───com
└───jdojo
└───intro
These are the module-info and java classes paths
C:\Java9Revealed\com.jdojo.address\src\module-info.java
C:\Java9Revealed\com.jdojo.address\src\com\jdojo\address\Address.java
C:\Java9Revealed\com.jdojo.person\src\module-info.java
C:\Java9Revealed\com.jdojo.person\src\com\jdojo\person\Person.java