I\'m trying to define a Java 9 module. I have defined something like:
module my.module.name {
}
Then many of my files started to give me error
Alright, the problem came out to be in the pom.xml! The reason I was getting "module not found" error during compilation was hidden behind a WARNING which I was thinking is not important, so I did not paste here in the logs. The warning was "zip END header not found". The reason for getting this warning was because I was having a "malformed jar" in my dependencies and thus the compiler was failing during parsing the module-info.java file and was producing the above errors. But which one was the "malformed" jar? It came out that it is this one (I used the method of exclusion one by one ... ):
org.apache.sshd
apache-sshd
1.7.0
pom
org.slf4j
slf4j-jdk14
I got that dependency from https://mvnrepository.com when searching for apache sshd, I'm not exactly sure what does "type pom" mean, but I'm guessing, that because Apache Mina is a set of several projects, in this way you include all the projects ... anyway, I only needed apache-sshd-core from all the projects, so I changed the dependency to the following (the Apache Mina Dev community advised me about that, so thanks a lot to them!!!):
org.apache.sshd
sshd-core
1.7.0
and now all compiles just fine! Thanks a lot to everyone for the comments and the help!